"Mike P" <mr*@telcoelectronics.co.uk> wrote in message
news:em*************@TK2MSFTNGP12.phx.gbl...
What is the equivalent of setting a global connection string in
Web.Config in WinForms?
WebForms apps have Web.config - WinForms apps have app.config.
They work in the same way i.e. name/value pairs.
Alternatively, you could add a public sealed class into a class module e.g.
public sealed class CGlobal
{
public const string strTest = "Hello Mike";
}
Then, you can refer to the public constants anywhere else in your code just
by writing something like:
string strGlobalTest = CGlobal.strTest;
You don't even need to set a reference to it.