what best proceed give c# auto-property an initial value?
how give c# auto-property an initial value?
i presumably constructor, return aged syntax.
controlling constructor:
class chairman
{
open person()
{
name = "initial name";
}
open twine name { get; set; }
}
using normal ability syntax (with an initial value)
private twine name = "initial name";
public twine name
{
{
relapse name;
}
set
{
name = value;
}
}
is there improved way?
Comments
Post a Comment