Cannot convert source type...

public static Object Create(string key)
{
string typeName= ConfigurationSettings.AppSettings[key];
Type typeInstance = Type.GetType(typeName);
return Activator.CreateInstance(typeInstance);
}


resharper doesn't like that. Please tell me why?


0
2 comments
Avatar
Permanently deleted user

Sean,

I've checked it and ReSharper shows no errors in this code for me.
Could you please describe the situation in more details or reproduce it on a
small project?

Thanks,
Dmitry

"Sean Malloy" <nosuchuser@arcturus.com.au> wrote in message
news:ceurvu$6f2$1@is.intellij.net...

public static Object Create(string key)
{
string typeName= ConfigurationSettings.AppSettings[key];
Type typeInstance = Type.GetType(typeName);
return Activator.CreateInstance(typeInstance);
}

>
>

resharper doesn't like that. Please tell me why?

>



0
Avatar
Permanently deleted user

I've checked it and ReSharper shows no errors in this code for me.
Could you please describe the situation in more details or reproduce it on

a

small project?


Wouldn't you know it. I leave things for a day, come back, and now I can't
reproduce it!

Maybe just a caching issue or something.



0

Please sign in to leave a comment.