properties - Is property a container and accessor in C#? -
i have property in class:
public string { set { = value; } }
it gives me error whenever try assign value a. actually, iis express stops , gives no clue.
i have feeling creates endless assignment of value a, it's recursion. questions:
- what happening in code?
- is property accessor (getter/setter) , not container when specify implementation?
- when using auto-implemented property, property both container , accessor?
you'll have stackoverflow exception, since you're assigning property in setter, results in endless assignment.
Comments
Post a Comment