Hello,
I have an app that uses codedom to generate classes. One of the
features I'd very much like to support is mixed scope for gets/sets in
properties ie...
public string MyProperty
{
get { return mMyProperty; }
private set { mMyProperty = value; }
}
I can't for the life of me figure out how I would accomplish that. I
even went so far as to use a CodeSnippetStat ement to fill in the set
value...
cd.CodeSnippetS tatement cssSet = new
cd.CodeSnippetS tatement(pSet.T oString());
myproperty.SetS tatements.Add(c ssSet);
but this of course returned a set within a set... not to mention, that
makes me code in every language I intend to support.... which is why I
would very much like to avoid doing properties by hand entirely.
any help greatly appreciated!
I have an app that uses codedom to generate classes. One of the
features I'd very much like to support is mixed scope for gets/sets in
properties ie...
public string MyProperty
{
get { return mMyProperty; }
private set { mMyProperty = value; }
}
I can't for the life of me figure out how I would accomplish that. I
even went so far as to use a CodeSnippetStat ement to fill in the set
value...
cd.CodeSnippetS tatement cssSet = new
cd.CodeSnippetS tatement(pSet.T oString());
myproperty.SetS tatements.Add(c ssSet);
but this of course returned a set within a set... not to mention, that
makes me code in every language I intend to support.... which is why I
would very much like to avoid doing properties by hand entirely.
any help greatly appreciated!
Comment