Find Of Type from Assembly - CSharp System.Reflection

CSharp examples for System.Reflection:Assembly

Description

Find Of Type from Assembly

Demo Code


using System.Reflection;
using System.Linq.Expressions;
using System.Linq;
using System;/* w  ww.j  av a  2  s.com*/

public class Main{
        public static Type FindOfType(Assembly ns, string typeName)
        {
            return ns.GetTypes().FirstOrDefault(x => x.Name == typeName);
        }
}

Related Tutorials