[Edit: My apologies ... the original question wording was ambiguous and I was not getting the responses I am looking for]
For any class X that inherits from class Y,
I think I can see what you are getting at
bool IsCollectionOfValueTypes(Object argValue)
{
Type t = argValue.GetType();
if(t.IsArray)
{
return t.GetElementType().IsValueType;
}
else
{
if (t.IsGeneric)
{
Types[] gt = t.GetGenericArguments();
return (gt.Length == 1) && gt[0].IsValueType;
}
}
return false;
}
A start anyway might get a bit more complicated if you pass in a multidimensional array or a contructed type. It's all in the class somewhere though.