varassembly=Assembly.LoadFile(assemblyPath);vartypes=assembly.GetExportedTypes();types.ToList().ForEach(type=>{varflag=type.GetMethods().Where(methodInfo=>!methodInfo.IsAbstract).Any(methodInfo=>methodInfo.IsDefined(typeof(MyAttribute),false));Console.WriteLine("Flag of IsDefined is: {0}",flag);});
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries"), SecurityCritical]internalstaticObjectHandleOnStackGetObjectHandleOnStack<T>(refTo)whereT:class{TypedReferencereference=__makeref(o);returnnewObjectHandleOnStack(reference.GetPointerOnStack());}