© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
14 replies
Sven ☕

❔ The best way to create custom types?

Hey, what's the best way to implement a custom type?
E.g. I want an Id and instead of having it like this:
int id = 12345;
int id = 12345;

I want it like that:
ID id = 12345;
ID id = 12345;

So I don't calculate with the ID for example because it's an ID, not some random number.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Best way to create websocket server in C#
C#CC# / help
2mo ago
❔ Best way to create unique order reference numbers?
C#CC# / help
3y ago
✅ the best way to clean up SqlConnection
C#CC# / help
3y ago
❔ Best way to learn C#?
C#CC# / help
3y ago