Get Properties - CSharp System.Reflection

CSharp examples for System.Reflection:PropertyInfo

Description

Get Properties

Demo Code


using System.Reflection;
using System.Linq;
using System.Collections.Generic;
using System;/*  w  w  w . j a va  2s.c  o  m*/

public class Main{
        public static IEnumerable<PropertyInfo> GetProperties(this Type type)
        {
            return type.GetTypeInfo().DeclaredProperties;
        }
}

Related Tutorials