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:

  1. what happening in code?
  2. is property accessor (getter/setter) , not container when specify implementation?
  3. 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

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -