is it possible to have a getter/setter template in c#?
c#, getter, setter
Solution
You could create a Code Snippet for Visual Studio to handle building a property this way.
MSDN includes documentation on Creating a Code Snippet, which can include replacement parameters (the name).
Problem
I want to apply this: ``` private string _name; public string name { get { return _name; } set { _name = Fix(value); } } ``` to all string the members of a class, and don't want to repeat the same code for all the class members. An obvious solution would be to put that code on a class to handle the problem and declare all string members as: `myString` instead of `string`, however that would mean that I would have to access the main class members like this: `email.fixed` instead of just `email`. So I was wondering, is there is some kind of template I can define and then apply easily?