CSharpSourceEmitter.Utils.IsMscorlibTypeNamed C# (CSharp) Method

IsMscorlibTypeNamed() public static method

True if the specified type is defined in mscorlib and has the specified name
public static IsMscorlibTypeNamed ( ITypeReference type, string name ) : bool
type ITypeReference
name string
return bool
    public static bool IsMscorlibTypeNamed(ITypeReference type, string name) {
      return (TypeHelper.GetTypeName(type) == name &&
          UnitHelper.UnitsAreEquivalent(TypeHelper.GetDefiningUnitReference(type), TypeHelper.GetDefiningUnitReference(type.PlatformType.SystemObject)));
    }