WHAT IS DIFFERENCE BETWEEN INDEXERS AND PROPERTIES?

Vikas Giri

Total Post:33

Points:165
Posted by  Vikas Giri
C# 
C#
 2224  View(s)
Ratings:
Rate this:
  1. Vikas Giri

    Post:33

    Points:165
    what is difference between indexers and properties?

    Difference between indexers and properties

    Properties allow methods to be called as though they were public data members. It accessed through a simple name. It can be a static or an instance member.

    Indexers allow methods on an object to be called as though the object is an array. It access through an index. It must be an instance member.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!