Can somebody tell me how to use CodeDom to generate an Auto-Implemented property? I can generate regular properties with getters and setters, but not sure how to generate the Auto-Implemented get;set; syntax using CodeMemberProperty.
Unfortunately the CodeDom has not been updated to allow developers to generate auto-implemented properties. If there is a workaround, I am not aware of it.
I hope this helps. Kevin Babcock
http://blogs.telerik.com/kevinbabcock
Unfortunately the CodeDom has not been updated to allow developers to generate auto-implemented properties. If there is a workaround, I am not aware of it.
I hope this helps. Kevin Babcock
http://blogs.telerik.com/kevinbabcock
var cfield = new CodeMemberField { Attributes = MemberAttributes.Public | MemberAttributes.Final, Name = MyPropName, Type = new CodeTypeReference(typeof(MyType)), }; cfield.Name += " {get;set;}//";