I am trying to dynamically load my type of authentication server based on settings. I hung up on how to cast a type when I don't know the type.
Type t = Type.GetType(WebConfigurationManager.AppSettings.Get("AuthenticationSvcImpl")); IAuthenticationService authCli = Activator.CreateInstance(t); return authCli.AuthenticateUser(login);
I know there is Convert.ChangeType (), but it just converts to an object ...
source share