public class ServiceUrl {
static public readonly login = "http://localhost/think/index.php/Index/login",
static public readonly softlist = "http://localhost/think/index.php/Index/softlist"
}这样写
用s = ServiceUrl.login; 调用
static public readonly login = "http://localhost/think/index.php/Index/login",
static public readonly softlist = "http://localhost/think/index.php/Index/softlist"
}这样写
用s = ServiceUrl.login; 调用
用struct吧,里面可以放各种类型
{
public static string PLCIP = string.Empty;
public static string DataCon1 = string.Empty; public static bool[] ConSuccess = new bool[2];
public static uint[] SuccessesCount = new uint[2];
public static uint[] FailsCount = new uint[2];
public static bool DBFail = false; public static string DBResult = string.Empty; public static bool[] PortOK = new bool[4]; public static int[] TestCount = new int[4];//线程运行计数
public static int[] ReadCount1 = new int[4];//串口通信计数
public static int[] ReadCount2 = new int[4];//串口数据计数
public static int[] ReadCount2_old = new int[4];//串口数据计数old
public static int[] ReadCount_delay = new int[4];//串口数据延迟计数
}调用方法就是Debug.PLCIP,这样.里面放什么都行.
仅仅是将变量封装了起来,不要求类型
{
public const string CylinderName = "柱体";
public const string ConeName = "锥体";
public const string CubeName = "立方体";
}