/// <summary> /// Check whether given symbol is from mscorlib /// </summary> public static bool IsFromMscorlib(this ISymbol symbol, Compilation compilation) { var @object = WellKnownTypes.Object(compilation); return(symbol.ContainingAssembly?.Equals(@object.ContainingAssembly) == true); }