I was just wondering about this question, so:
First: Is it even wise to do so?
Second: If yes, which approach should one use?
Approach one: Just create a class to hold static variables. Something like this:
class Constants
{
// used for holding application-wide constant values
// like filenames
public static string TABLE_SHEMA_FILE_NAME = "TableShema.xml";
public static string APP_SETTINGS_FILE_NAME = "AppSettings.tar";
}
Or approach two:
class Constants
{
// used for holding application-wide constant values
// like filenames
public static string AppPath
{
get { return Application.StartupPath+@"\"; }
}
}
Or is there any other/ better/ more OOP oriented way to do it?
Thanks!

New Topic/Question
Reply



MultiQuote






|