Steve,
Well, if all of the classes in the namespace are in the same assembly,
then you can mark the constant as internal.
However, if your classes in the namespace are spread across separate
assemblies, then you will have to declare the constant as public, so that
outside of your declaring assembly, the constant can be seen. Of course,
that means that anyone anywhere can see the constant, not just the members
of that namespace.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Steve" <ki****@harpservices.comwrote in message
news:14********************************@4ax.com...
Hi All,
I'm new to C# so bear with me. I have a public string const that I
need to be visible within any class within my namespace so I'll have
one place to maintain the string value and have changes affect all
classes.
What is the preferred way to do this?
Thanks,
Steve