O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

ArrayWithOffset

Synopsis

This class converts an array of value type instances to an unmanaged array. Your unmanaged code accesses this array as a pointer that initially points to the first array element. Each time the pointer increments, it points to the next element in the array. The constructor takes a mandatory offset argument that specifies which element should be the first element in the unmanaged array. If you want to pass the whole array, specify an offset of zero.

public struct ArrayWithOffset {
// Public Constructors
   public method ArrayWithOffset(object array, int offset);  
// Public Instance Methods
   public override method bool Equals(object obj);              // overrides ValueType
   public method object GetArray();  
   public override method int GetHashCode();                     // overrides ValueType
   public method int GetOffset();  
}

Hierarchy

System.ObjectSystem.ValueTypeArrayWithOffset

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required