if (datareader != null && datareader .HasRows) Dictionary<string, PropertyInfo> pDict= GetPropertyDictionary<T>(); while (datareader .Read()) T myobj= new T();if (pDict.TryGetVal
在我的应用程序中,我需要显示由不同存储过程返回的记录列表。每个存储过程返回不同类型的记录(即列数和列类型不同)。 public class MyCustomClass1 public int Col1 { get; set; } //In reality the columns are NOT called Col1 and Col1 but have proper names
public int Col2 {