判断数组中是否存在某个数组值
string[] LeaderUID = { "IFY001", "IFY002", "IFY003", "IFY004", "IFY005", "IFY006", "IFY007", "IFY008", "IFY009", "IFY010", "IFY011", "IFY012", "IFY013", "IFY014", "IFY015", "IFY016", "IFY017", "IFY018" };
int id = Array.IndexOf(LeaderUID, UserName);
if (id==-1)
{
imguid.InnerText = "不存在";
}
else
{
imguid.InnerText = "存在";
}
将小数转换为百分数
Convert.ToDouble(DataReader["Production"]).ToString("P");