Primitive enum types - does it exist

I need to provide the user with a list of all available primitive types, and I wondered if Enum is in the .net library that has all the primitive types, so I don't need to create it.

+6
enums c # primitive-types
source share
3 answers

The closest you will be System.TypeCode .

+7
source share

Not a listing, but:

var primitives = typeof(int).Assembly.GetTypes() .Where(type => type.IsPrimitive).ToArray(); 
+10
source share

No, there is no such listing.

+5
source share

All Articles