I\'ve got a situation where I need to generate a class with a large string const. Code outside of my control causes my generated CodeDom tree to be emitted to C# source and
Note that if you declare the string as const, it will be copied in each assembly that uses this string in its code.
You may be better off with static readonly.
Another way would be to declare a readonly property that returns the string.