Here, In the below problem, We have created an indexer in class ‘Main’. With indexer, we are putting and retrieving values to an array of int type. Indexer use get and set accessor to get and set value from/to the array. Indexer name should be 'this’. Inside class 'Program’, we have created an object of class 'Main’ and that object is now working similar to an array. The reason is one and only indexer. Indexer allows the object to be treated as an array as shown in the program. Index on which value is not assigned will be by default set to 0. from https://csharpcorner.tumblr.com/post/170371818031
0 Comments
Leave a Reply. |
About Me
Hi I am Carla Smith, I am a software engineering student. I love games and I want to be a gaming programmer in future. ArchivesNo Archives Categories |