How can I check if a generic method parameter is a value type?
Asked 2011-10-03T13:27:31.363
9
Is there a way to check if a variable is value type of reference type?
Imagine:
private object GetSomething<T>(params T[] values)
{
foreach (var value in values)
{
bool is ValueType; // Check if 'value' is a value type or reference type
}
}