System.Runtime.InteropServices.ArrayWithOffset Structure

Assembly: Mscorlib.dll
Namespace: System.Runtime.InteropServices
Summary
Encapsulates an array and an offset within the specified array.
C# Syntax:
public struct ArrayWithOffset
Remarks
Can be used as an argument to a native method reached through platform invoke. In this case, the platform invoke marshaler will retrieve the starting address of the array, add the offset, and pass the resulting pointer to the underlying native function. This structure only supports arrays containing no references, such as primitive type arrays and value type arrays containing only fields of primitive types.
See also:
System.Runtime.InteropServices Namespace

System.Runtime.InteropServices.ArrayWithOffset Member List:

Public Constructors
ctor #1 Initializes a new instance of the ArrayWithOffset structure.
Public Methods
Equals Overridden:
Indicates whether the specified object matches the current ArrayWithOffset.
GetArray Returns the managed array referenced by this ArrayWithOffset.
GetHashCode Overridden:
Returns a hash code for this value type.
GetOffset Returns the offset provided when this ArrayWithOffset was constructed.
GetType
(inherited from System.Object)
See base class member description: System.Object.GetType

Derived from System.Object, the primary base class for all objects.
ToString
(inherited from System.ValueType)
See base class member description: System.ValueType.ToString


Returns the fully qualified type name of this instance.
Protected Methods
Finalize
(inherited from System.Object)
See base class member description: System.Object.Finalize

Derived from System.Object, the primary base class for all objects.
MemberwiseClone
(inherited from System.Object)
See base class member description: System.Object.MemberwiseClone

Derived from System.Object, the primary base class for all objects.

Hierarchy:


System.Runtime.InteropServices.ArrayWithOffset Member Details

ctor #1
Summary
Initializes a new instance of the ArrayWithOffset structure.
C# Syntax:
public ArrayWithOffset(
   object array,
   int offset
);
Parameters:

array

A managed array.

offset

The offset in bytes, of the element to be passed through platform invoke.

Return to top


Overridden Method: Equals(
   object obj
)
Summary
Indicates whether the specified object matches the current ArrayWithOffset.
C# Syntax:
public override bool Equals(
   object obj
);
Parameters:

obj

Object to compare with this instance.

Return Value:
true if the object matches this ArrayWithOffset; otherwise, false.

Return to top


Method: Finalize()
Inherited
See base class member description: System.Object.Finalize
C# Syntax:
~ArrayWithOffset();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetArray()
Summary
Returns the managed array referenced by this ArrayWithOffset.
C# Syntax:
public object GetArray();
Return Value:
The managed array this instance references.

Return to top


Overridden Method: GetHashCode()
Summary
Returns a hash code for this value type.
C# Syntax:
public override int GetHashCode();
Return Value:
The hash code for this instance.

Return to top


Method: GetOffset()
Summary
Returns the offset provided when this ArrayWithOffset was constructed.
C# Syntax:
public int GetOffset();
Return Value:
The offset for this instance.

Return to top


Method: GetType()
Inherited
See base class member description: System.Object.GetType
C# Syntax:
public Type GetType();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: MemberwiseClone()
Inherited
See base class member description: System.Object.MemberwiseClone
C# Syntax:
protected object MemberwiseClone();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: ToString()
Inherited
See base class member description: System.ValueType.ToString

Summary
Returns the fully qualified type name of this instance.
C# Syntax:
public override string ToString();
Return Value:
A String containing a fully qualified type name.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.