反射
PropertyInfo[] piDevice = device.GetType().GetProperties();
foreach (PropertyInfo item in piDevice)
{
if (item.Name == "aaa")
{
if (item.GetValue(device, null) != null)
{
string a = item.GetValue(device, null).ToString();
if (a == 100)
{
}
}
}
}