public static bool TryGetPrimitiveElementType(TypeDefinition type, out ElementType etype)
{
Row <ElementType, bool> row;
etype = ElementType.None;
if (type.Namespace != "System")
{
return(false);
}
if (!MetadataSystem.TryGetPrimitiveData(type, out row) || !((ElementType)row.Col1).IsPrimitive())
{
return(false);
}
etype = row.Col1;
return(true);
}