02.05.2014 Views

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Basics<br />

CreateIncreasing - This method creates Extent and reverts values to ensure new<br />

extent has positive increment. This method is static.<br />

Extent increasingExt = Extent.CreateIncreasing(20, 10, -2);<br />

// result is 2, 4, 6, 8, 10, 12, 14, 16, 18, 20<br />

Reverse - This method creates a reversed copy of the object.<br />

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

Extent reverseExt = myExt.Reverse();<br />

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

Accessing data in an Extent is done with a foreach loop.<br />

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

foreach (int val in myExt)<br />

{<br />

// val will be 5, 6, 7, 8, 9, 10, 11, 12, 13, 14<br />

...<br />

}<br />

Extent2 and Extent3 Classes<br />

Extent2 and Extent3 are also sealed classes that derive from ExtendKdBase class.<br />

They both provide pretty much the same constructors, properties, and methods as the<br />

Extent class.<br />

4-114 <strong>Ocean</strong> Application Development Framework 2008.1<br />

<strong>Schlumberger</strong> Private

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

Saved successfully!

Ooh no, something went wrong!