Returns the byte offset for a field within a class used by Marshal.
[Visual Basic] Public Shared Function OffsetOf( _ ByVal t As Type, _ ByVal fieldName As String _ ) As Integer [C#] public static int OffsetOf( Type t, string fieldName ); [C++] public: static int OffsetOf( Type* t, String* fieldName ); [JScript] public static function OffsetOf( t : Type, fieldName : String ) : int;
Offset in bytes, for fieldname within the PInvoke-declared class c.
Marshal Class | Marshal Members | System.Runtime.InteropServices Namespace