I am working with a WPF application in C #. I have a number of constants defined in a static class as follows:
Project1:
namespace MyCompany
{
public static class Constants
{
public static int MY_CONSTANT = 123456;
}
}
Then, all I need to do to access my constant anywhere in project 1 is:
int x = Constants.MY_CONSTANT;
Now I am adding another project to the same solution and using the same root namespace:
Project 2
namespace MyCompany.MyControl
{
class VideoControl
{
int x;
x = Constants.MY_CONSTANT;
x = MyCompany.Constants.MY_CONSTANT;
}
}
I just can't figure out how to access my static Constants class from the second assembly. I also can’t add a link to the first assembly because it leads to a cyclical dependency (the second build of the project is the WPF control used by the first build of the project).
, ? , .