string[] Position = {"校长","副校长","书记","教导主任","学校管理员","班主任"};
if (Position.Any(r => r.IndexOf(val) != -1))
{
//职务在规定值中
}
else
{
//职务不在规定值中
}
string[] Position = {"校长","副校长","书记","教导主任","学校管理员","班主任"};
if (Position.Any(r => r.IndexOf(val) != -1))
{
//职务在规定值中
}
else
{
//职务不在规定值中
}