get C# (get c# reference)

Thursday, 15 January 2009
"get" is a keyword that defines an accessor method in a property or indexer that retrieves the value of the property or the indexer element.

For example : get C#
This is an example of a get accessor in a property name balance:

class BankAccount
{
private double balance;
public double Balance
{
get { return balance; }
set { balance=value; }
}
} // end get C# example

0 comments:

Post a Comment