I’m trying to load SqlConnection dynamically like this:
asm = [Assembly].LoadWithPartialName("System.Data")
con = asm.GetType("System.Data.SqlClient.SqlConnection")
How can I convert con, which is of the type "System.RuntimeType", to SqlConnection
Thanks

Casting from System.RuntimeType
Jonas Røineslien
technoTABLET
You can't cast a Type object to a SqlConnection. If you want to create an instance of the type, check out the Activator.CreateInstance method.