Sam:
C# only has a:
#define symbol
which can only be used by other preprocessor commands, unlike C/C++'s
#define symbol value
To achieve what you want, create a class and use a const:
public class Globals{
public const string ApplicationName = "SomeThing";
}
and you can then use the global via:
Globals.ApplicationName
this way you aren't repeating the content every single place..
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"I am Sam" <Ia****@discussions.microsoft.com> wrote in message
news:95**********************************@microsof t.com...
I want declare some const strings in my application but I don't want to
repeat the constents in every page I write in my codebehind I was
wondering if there is some kind of directive or preprocessor I can declare at the
top of my codebehind that will import the constents from a seperate file.
I hope I'm using the correct language I am not sure if it is
understandable but I have to try. Thank you in adavance to anyone that will reply.
Sam-