A
AMP
Hello,
I have a class:
namespace Constant
{
class Constants
{
public const int Mike = 12;
public const int Anna = 14;
}
}
and another:
namespace Constant
{
class ConstantReader
{
public void ConstantReaderMethod()
{
Console.WriteLine(Constants.Anna);
}
}
}
I can read the Constants.Anna value without any reference to the
Constants class, how come?
I would have figured I would need a Constant C = new Constants(), but
I dont.
Any help is always appreciated.
Thanks
Mike
I have a class:
namespace Constant
{
class Constants
{
public const int Mike = 12;
public const int Anna = 14;
}
}
and another:
namespace Constant
{
class ConstantReader
{
public void ConstantReaderMethod()
{
Console.WriteLine(Constants.Anna);
}
}
}
I can read the Constants.Anna value without any reference to the
Constants class, how come?
I would have figured I would need a Constant C = new Constants(), but
I dont.
Any help is always appreciated.
Thanks
Mike