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 />

public Index2 Back { get; }<br />

public Index2 Front { get; set; }<br />

public Index2 Length { get; set; }<br />

public Index2 MaxValue { get; }<br />

public Index2 MinValue { get; }<br />

public Index2 Origin { get; set; }<br />

public Index2 Stride { get; set; }<br />

}<br />

public object Clone ();<br />

public Extent CopyIncreasing ();<br />

public static Extent CreateIncreasing (int begin, int count,<br />

int stride);<br />

public Extent Reverse ();<br />

Defining an Extent with a starting value of 50 and containing 100 members incrementing<br />

by 1 would be done by:<br />

Extent myExt = new Extent(50, 100);<br />

The range of values in this Extent would run from 50 to 149. The number of values may<br />

not be negative.<br />

Table 4-1 Extent Object Values Example<br />

50 51 52 53 54 55 56 ... 148 149<br />

To use an increment other than 1 the constructor for the Extent is changed. For an<br />

increment of 2 the code would be:<br />

Extent myExt = new Extent(50, 100, 2);<br />

The range of values in this Extent would run from 50 to 248. The increment value may<br />

be positive or negative but cannot be 0.<br />

Table 4-2 Extent Object Values with Increment of 2<br />

50 52 54 56 58 60 62 ... 246 248<br />

Printing an Extent with the ToString method results in a notation of “begin : inc :<br />

end”. So for the Extent created by “new Extent(50, 100, 2)” the ToString result<br />

is “50 : 2 : 248”.<br />

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

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

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

Saved successfully!

Ooh no, something went wrong!