I am an experienced C# programmer who is working on a VB
.NET project now. I am writing different methods covering the following functionalities
1) Take a datareader as input and return an arraylist of class object
2) Take an xmlnode (received from a webservice) as input and return an arraylist of class object.
The methods are generic methods which take datareader/xmlnode as first parameter and classname (string) as the second parameter. This way it will work trivially.
The schema of class object matches with the input (datareader or xmlnode)
In C# I used to do this by using reflection and Type.GetType(). But the Type.GetType() is not working in VB
.NET. Its returning "Nothing". I made sure that the namespace/class names are spelled properly. I even tested the same code in C# and it works like a charm. Only in VB
.net it does not work.
file is created inside the App_Code folder of the web application.
I read other posts and removed the temporary asp.net files and stuff but didn't help
Any help will be greatly appreciated
Type type_ClassName = Type.GetType(className); //Works like a charm
Dim oType As Type = Type.GetType("JEB.DocumentIdsCaseNumbers") // Does not work :(
I used Immediate window on debug mode for both vb
.net and c# and confirmed that it does not work in vb
Please help me to get the GetType() working in VB