Default Property

  • Thread starter Thread starter Shawn B.
  • Start date Start date
S

Shawn B.

How do I set a default property in C#? In VB we use the default keyword
before the property.


Thanks,
Shawn
 
Shawn,
How do I set a default property in C#? In VB we use the default keyword
before the property.

You use indexer syntax:

public string this[int idx]
{
get { ... }
set { ... }
}



Mattias
 
Back
Top