public static T SetPropertyValue <T>(string propertyName, object value) { var item = Activator.CreateInstance <T>(); var pInfo = typeof(T).GetProperty(propertyName); WmiHelper.SetPropertyValue(pInfo, value, item); return(item); }