I am loading the dll as shown below,
Type[] _Type = Assembly.GetAssembly(typeof(StdAdapter)).GetTypes();
Now I want to get all the properties for a particular 'class name' which is being passed as a string.
Please suggest how to achieve this.
Thanks
You can use
When you get this time you can use the type for further reflection:
which will return the properties.
This mean insteaf of your call into an array, you could use:
The only other thing would be to loop through the array in order to find the right Type, not sure performance wise which would be better, i'd go with GetType() though.
You could use a little bit of Linq to Objects to get the class you need from the array:
The Type.GetProperties() function returns an array of PropertyInfo objects.
So you would have:
You could also do: typeof(StdAdapter).GetProperties()