C#--应用结构体变量
1、定义:
2、应用
/// <summary>
/// 定义ITP Head信息的结构体变量(siteID、productLineID、priceType、year、period)
/// </summary>
public struct ITPHeadInfor
{
public int siteID;
public int productLineID;
public SystemEnum.PriceType priceType;
public int year;
public int period;
}
/// 定义ITP Head信息的结构体变量(siteID、productLineID、priceType、year、period)
/// </summary>
public struct ITPHeadInfor
{
public int siteID;
public int productLineID;
public SystemEnum.PriceType priceType;
public int year;
public int period;
}
2、应用
protected static List<CommonFunction.ITPHeadInfor> ms_ITPHeadIDs = new List<CommonFunction.ITPHeadInfor>();
public static List<CommonFunction.ITPHeadInfor> ITPHeadIDs
{
get
{
return ms_ITPHeadIDs;
}
}
{
get
{
return ms_ITPHeadIDs;
}
}
CommonFunction.ITPHeadInfor headInfor = new CommonFunction.ITPHeadInfor();
headInfor.year = year;
headInfor.siteID = siteID;
headInfor.productLineID = productLineID;
headInfor.priceType = (SystemEnum.PriceType)priceType;
headInfor.period = period;
//添加到List供到Oracle的使用
if (!ms_ITPHeadIDs.Contains(headInfor))
{
ms_ITPHeadIDs.Add(headInfor);
}
headInfor.year = year;
headInfor.siteID = siteID;
headInfor.productLineID = productLineID;
headInfor.priceType = (SystemEnum.PriceType)priceType;
headInfor.period = period;
//添加到List供到Oracle的使用
if (!ms_ITPHeadIDs.Contains(headInfor))
{
ms_ITPHeadIDs.Add(headInfor);
}