FieldInfo.IsPinvokeImpl Property
.NET Framework 4
Gets a value indicating whether the corresponding PinvokeImpl attribute is set in FieldAttributes.
Assembly: mscorlib (in mscorlib.dll)
Property Value
Type: System.Booleantrue if the PinvokeImpl attribute is set in FieldAttributes; otherwise, false.
Implements
_FieldInfo.IsPinvokeImplThe following example creates a class and displays the name, field and IsPinvokeImpl property value of the field.
using System; using System.Reflection; public class Fieldinfo_IsPinvoke { public string myField = "A public field"; public static void Main() { Fieldinfo_IsPinvoke myObject = new Fieldinfo_IsPinvoke(); // Get the Type and FieldInfo. Type myType1 = typeof(Fieldinfo_IsPinvoke); FieldInfo myFieldInfo = myType1.GetField("myField", BindingFlags.Public|BindingFlags.Instance); // Display the name, field and the PInvokeImpl attribute for the field. Console.Write("\n Name of class: {0}", myType1.FullName); Console.Write("\n Value of field: {0}", myFieldInfo.GetValue(myObject)); Console.Write("\n IsPinvokeImpl: {0}", myFieldInfo.IsPinvokeImpl ); } }
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.