.net 反射構造你自己的「匿名」對象

由於近來項目的底層架構某些特殊需求及場景的需要要求動態build一個對象, 屬性名稱個類與類型都是外界動態傳入的。 不多說廢話,直接上我最原始的代碼: 1 public static Type GetMyType() 2 { 3 string[] namelist = new string[] { "UserName", "UserID
相關文章
相關標籤/搜索