CSharp examples for System.Reflection:PropertyInfo
Get Property
using System.Reflection; using System.Linq; using System.Collections.Generic; using System;/*from ww w. j a v a 2s . c o m*/ public class Main{ public static PropertyInfo GetProperty(this Type type, string name) { return type.GetTypeInfo().DeclaredProperties.FirstOrDefault(p => p.Name == name); } }