Sorry if the question sounds confusing. My problem is that I am using the following:
var packageType = Type.GetType(className);
I have checked very carefully that className is the fully qualified name of a type. I checked the className variable many times. But still when this is executed it gives packageType as null !
I know my class name is Product. Is there a way that I can get a string representation of the name so I can check to see if it compares exactly with the className string I am passing to the above.
You may need to provide the assembly qualified name. Note:
Type.GetType
For example, if I am trying to get a type defined outside of the currently executing assembly, I could use
Type.GetTypeas following:If inside the executing assembly, I only need to qualify it via the namespace