Wednesday, July 21, 2010

Overall understanding of C # (3 indexer)



3. Indexer

C # by providing indexer, you can handle an array as the processing object. Particular attributes, each element of a get or set method of exposure.

public class Skyscraper

(

Story [] stories;

public Story this [int index]

(

get

(

return stories [index];

)

set

(

if (value! = null)

(

stories [index] = value;

)

)

)

//...

)

Skyscraper empireState = new Skyscraper (/*...*/);

empireState [102] = new Story ("The Top One", /*...*/);

銆怸i Zhu: Indexer's biggest advantage is that the code looks more natural and realistic thinking銆?br />






相关链接:



Avi To Mp4 Converter



iPod VQF to OGG



Games Card brief



SPARK Trilogy: to see how we change the world



Vehicles - Screen Savers Storage



mp3 to mp4



Nine ways to recruit good staff



Dawn set sail: Shenzhen Deng Yihui (2)



RealGuitar



.mkv file



Loans to 200 million gamble Hanwang tablet PC this year, LANDING the mainland A shares



youtube to mpg



Beatcraft drum machine



No comments:

Post a Comment