/// <summary>
/// Specifies flags for the attributes of a method implementation.
/// </summary>
[ComVisible(true)]
[__DynamicallyInvokable]
[Serializable]
public enum MethodImplAttributes
{
[__DynamicallyInvokable] IL = 0,
[__DynamicallyInvokable] Managed = 0,
[__DynamicallyInvokable] Native = 1,
[__DynamicallyInvokable] OPTIL = 2,
[__DynamicallyInvokable] CodeTypeMask = 3,
[__DynamicallyInvokable] Runtime = 3,
[__DynamicallyInvokable] ManagedMask = 4,
[__DynamicallyInvokable] Unmanaged = 4,
[__DynamicallyInvokable] NoInlining = 8,
[__DynamicallyInvokable] ForwardRef = 16,
[__DynamicallyInvokable] Synchronized = 32,
[__DynamicallyInvokable] NoOptimization = 64,
[__DynamicallyInvokable] PreserveSig = 128,
[ComVisible(false), __DynamicallyInvokable] AggressiveInlining = 256,
[__DynamicallyInvokable] InternalCall = 4096,
MaxMethodImplVal = 65535,
}
Why is this enum not marked with the FlagsAttribute? It is used like bitfields in all examples you can find on MSDN and most of the guidelines for the attribute on MSDN match this definition.
MethodBuilder.SetImplementationFlags() even implies that it is used like an enum marked with [Flags] aside from the MSDN example code.
Aucun commentaire:
Enregistrer un commentaire