I think it's more difficult to ask than answering the question.
I wanna ask my question with an example:
You know that we can bind an object to a DataSource, and that object could be of any type. So suppose I've bound an object of type "MyClass" to DataSource of a DataSet.
Now I send this dataset as a parameter to another class in another DLL, and in this DLL file I want to create a List<> of type of "MyClass".
As I have not access to "MyClass" type i can use this code to get the type of DataSource:


but I can't use the code like the following to create a List of type of "MyClass":
List<_dataSet.DataSource.GetType()> _list;

What should I do in this situation?

You can get the type of an object by passing that object to they typeof method.

Type t = typeof(MyClass);

but if the type is not available to the namespace you are in, then it won't work. you need to expose that type to your other dll, and if you can't, then you need to define that type again so that it is available.