Previous....
Next.....
In the example below Customer is the Type and private fields(_id, _firstName, _lastName), Properties(Id, FirstName, LastName) and GetFullName() method are type members.
Next.....
Next.....
In the example below Customer is the Type and private fields(_id, _firstName, _lastName), Properties(Id, FirstName, LastName) and GetFullName() method are type members.
Previous....public class Customer
{
#region Private Fields
private int _id;
private string _firstName;
private string _lastName;
#endregion
#region Properties
public int Id
{
get
{
return _id;
}
set
{
_id = value;
}
}
public string FirstName
{
get { return _firstName;
}
set
{ _firstName = value;
}
}
public string LastName
{
get
{
return _lastName;
}
set
{
_lastName = value;
}
} #endregion
#region Methods
public string GetFullName()
{
return this._firstName + " " + this._lastName;
}
#endregion
}
Next.....
No comments:
Post a Comment