Monday 11 August 2014

Indexer, unsafe code in C#


Indexer
  1. An indexer allows an object to be indexed like an array. When you define an indexer for a class, 
  2. This class behaves like a virtual array. You can then access the instance of this class using the array access operator ([ ]).
  3. An indexer provides array-like syntax. It allows a type to be accessed the same way as an array. 
  4.     Properties such as indexers often access a backing store. We often accept an int parameter and access a backing array Property
  5.    An indexer is a member that enables an object to be indexed in the same way as an array.

UNSAFE:

  1.  C# allows using pointer variables in a function of code block when it is marked by the unsafe modifier.
  2.    The unsafe code or the unmanaged code is a code block that uses a pointer variable.

No comments:

Post a Comment