C
chester
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 CodeSnippetStatement to fill in the set
value...
cd.CodeSnippetStatement cssSet = new
cd.CodeSnippetStatement(pSet.ToString());
myproperty.SetStatements.Add(cssSet);
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 CodeSnippetStatement to fill in the set
value...
cd.CodeSnippetStatement cssSet = new
cd.CodeSnippetStatement(pSet.ToString());
myproperty.SetStatements.Add(cssSet);
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!