© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
C
C#
•
3y ago
•
40 replies
Theos
❔ Switch case on Int type
Hey
, so I have a class with variable
_type
_type
and I want to store a variable type in it
(long
, int
, short
, ubyte etc etc
)
.
Later I want to do a switch on
_type
_type
something like
switch(_type)
{
case long:
case int:
}
switch(_type)
{
case long:
case int:
}
How can I do this
?
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
cant convert type (int, int) to Vector2
C
C# / help
2y ago
❔ C# Arrays/Switch case help
C
C# / help
3y ago
✅ Switch Case Not Executing Properly
C
C# / help
3y ago
❔ Assigning variables in switch case
C
C# / help
4y ago