What is the point of using : int in an enumeration declaration as follows:
public enum AAType : int { Folder = 0, File = 1, Link = 2 }
The default support type enum is int . You can change the type of support to something else, such as short or long . An int possible, just for clarity.
enum
int
short
long
The enum type is int default, so by explicitly specifying it you can (possibly) get clarity, but the behavior was the same as if : int were omitted.
: int
The fact that Enum is a specialized Int, you can use bytes for each Enum value (Apple = 1, Pear = 2, Orange = 4), and then you can pass Enums in Piped and determine what to do based on the byte (look at Reflection.BindingFlags, etc.).
Source: https://habr.com/ru/post/1306641/More articles:Is there something wrong with GC.KeepAlive spam (KeyboardHookPointer)? - garbage-collectionXpath to get second url with corresponding text in href tag - javaIs the order I declare pointers really matters in C? Problem getcwd () - cHow to enable key input? - javascriptefficiently finding non-zeros spacing in scipy / numpy in Python? - pythonCan SerialVersionUid be any number or should it be generated by the compiler? - javaiPhone GUI for displaying real-time messages - iphoneProgrammatically insert page break in ActiveReports - reportingMIPS assembly: how to declare integer values ββin a .data section? - assemblyConstant NSDictionary / NSArray for class methods - objective-cAll Articles