public static T GetObj(Employee model)
{
T result = default(T);
if (model is T)
{
result = (T)(object)model; //或 (T)((object)model);
}
return result;
}
时间: 2024-10-16 22:29:48