Skip to content

Instantly share code, notes, and snippets.

@jagregory
Created July 28, 2010 20:27
Show Gist options
  • Save jagregory/496153 to your computer and use it in GitHub Desktop.
Save jagregory/496153 to your computer and use it in GitHub Desktop.
Is there any common name for all these types?
string
char
int
long
short
double
float
byte
bool
DateTime
Not all primitives.
Not all value types.
@SittenSpynne
Copy link

I consider them primitives. DateTime is kind of an odd choice on this list; why that and not TimeSpan as well? I think the list without DateTime is "primitives" and with DateTime/TimeSpan is maybe "intrinsics"?

@jagregory
Copy link
Author

The list isn't exhaustive. TimeSpan should be on there, as should all the u* types, and decimal, enums, and probably some more. Everything except class, basically.

@robertpi
Copy link

string is a class, but I see what you mean. I think primatives is a pretty good description, there the stuff you compose to represent data. I don't think you'd want to inculde all value types either, there's a lot of yuck stuff in the values types like IntPtr, SqlInt and Nullable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment