Class To Html Table
List<T> olan bir veriyi html çıktı olarak hazırlama…
Yazılım Geliştirme, Sistem Yönetimi ve Veritabanı Yönetimi
C# / Reflection
public static T SetXmlDataToViewModel&lt;T&gt;(T oViewModel, string xmlData) { if (string.IsNullOrEmpty(xmlData)) { return oViewModel; } XDocument dataXmlDoc = XDocument.Parse(xmlData); foreach (var prop in typeof(T).GetProperties()) { if (dataXmlDoc.Descendants().SingleOrDefault(p =&gt; p.Name.LocalName == prop.Name) != null) prop.SetValue(oViewModel, Convert.ChangeType(dataXmlDoc.Descendants().SingleOrDefault(p...
Daha fazla