我有2节课
1 类。
public class BaseContentPage : System.Web.UI.Page
{
}
2 类。
public class BaseUserControl : System.Web.UI.UserControl
{
}
现在我希望他们知道这门课。
public class BaseCommon
{
public string Variable1 { get; set; }
public string Variable2 { get; set; }
public string Variable3 { get; set; }
}
我目前的做法是使 BaseCommon 类的变量像这样静态
public static string Variable1 { get; set; }
public static string Variable2 { get; set; }
public static string Variable3 { get; set; }
我还能怎么做?