E
ESPN Lover
I'm fairly new to the whole .NET and OOP programming so bear with me.
In the past if I wanted to have constants defined that I could use in my
code, I'd include them either the file or as an include file. But with .NET
and OOP, there has to be a different way than just including them in each of
the classes I want to utilize them in.
Here's an example of what's in the definition of each of the classes I need
to use it in.
private const string LAUNCH_TEXT = "Welcome to the Program";
private const string QUIT_TEXT = "Goodbye";
Can this be put into it's own file and then "included" with each class I
want to use it in? What would be the proper way? Thanks!
In the past if I wanted to have constants defined that I could use in my
code, I'd include them either the file or as an include file. But with .NET
and OOP, there has to be a different way than just including them in each of
the classes I want to utilize them in.
Here's an example of what's in the definition of each of the classes I need
to use it in.
private const string LAUNCH_TEXT = "Welcome to the Program";
private const string QUIT_TEXT = "Goodbye";
Can this be put into it's own file and then "included" with each class I
want to use it in? What would be the proper way? Thanks!