我的静态课内有conts:
static class RestfulPaths {
static string BASE_URL = "A";
static string SYNC_CHECK = "A";
}
在另一个类中,我尝试将const作为:
RestfulPaths.BASE_URL
答案 0 :(得分:0)
使您的课程及其属性也public
,然后您将从其他课程中获取它们。
public static class RestfulPaths
{
public static string BASE_URL = "A";
public static string SYNC_CHECK = "A";
}
答案 1 :(得分:-1)
public static class RestfulPaths {
public static string BASE_URL = "A";
public static string SYNC_CHECK = "A";
}