02.05.2014 Views

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Basics<br />

Length – This property returns the length of the array.<br />

int lengthVal = extVal.Length;<br />

//result is 10<br />

MaxValue – This property returns the largest value in the array.<br />

int maxVal = extVal.MaxValue;<br />

//result is 11<br />

MinValue – This property returns the smallest value in the array.<br />

int minVal = extVal.MinValue;<br />

//result is 2<br />

Origin – This property returns the Origin value.<br />

int origVal = extVal.Origin;<br />

//result is 1<br />

Stride – This property returns the constant step increment between values in the array<br />

in the Extent.<br />

int incVal = extVal.Stride;<br />

//result is 1<br />

The Extent class provides the following methods:<br />

Clone – This method clones the Extent object.<br />

Extent myExt = new Extent(5, 10);<br />

Extent cloneExt = myExt.Clone();<br />

// result is 5, 6, 7, 8 , 10, 11, 12, 13, 14<br />

CopyIncreasing - This method copies the Extent; reverse if needed to ensure<br />

positive increment.<br />

Extent myExt = new Extent(5, 10, -1);<br />

// result is 5, 4, 3, 2, 1, 0, -1, -2, -3, -4<br />

Extent copyExt = myExt.CopyIncreasing ();<br />

// result is -4, -3, -2, -1, 0, 1, 2, 3, 4, 5<br />

<strong>Schlumberger</strong> Private<br />

<strong>Ocean</strong> Services 4-113

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!