I was pondering of this while I was writing some helper functions dealing with reflection. Is there anything else besides class
es, struct
s, enum
s and interface
s in C#? If I write a function that checks for class
, struct
, enum
and interface
, would that be the all encompassing function?
I read that delegate
s are classes anyway here and here.
Help me make my idea on this kind of hierarchy perfect:
reference type value type
| |
--------------- ----------
| | | |
interface class struct enum
// the all encompassing function - pseudo code:
public static bool IsC#Stuff(this Type type)
{
return type.IsEnum || type.IsStruct || type.IsClass || type.IsInterface;
}
Am I missing something?