I have a really long string (reallyLongString below) and want to put its declaration/definition in a separate file from the main code.
How do I do that? Thanks.
Can I just surround it with "public partial class MainWindow: Window {" and "}" in another file?
namespace MyApp
{
public partial class MainWindow : Window
{
string reallyLongString = "...";
...
}
...
}
Yes basically, although I think you can only specify the sub-type once. So in one file:
And in the other:
You could also look at a resx or an embedded resource, rather than a literal.