I cannot reproduce the reported behavior. If it really reproduces, this is a mistake. There is no explicit conversion from string to any user interface.
Please update the question with the version number of the compiler used and a small program that reproduces the problem, and I will get an error entered into the error database.
Thanks!
UPDATE: It does not appear to play on the command line, but is allegedly played in VS2008.
I can't play it in the VS2010 RC build, so if this is actually a bug in VS2008, it probably has been fixed. I don't have VS2008 installation right now to check, unfortunately.
Regardless of if you see this diagnostic, the chances are very good, itโs just a mistake in the heuristic of error messages in the semantic analyzer. Obviously, there is no explicit conversion from string to IFoo.
There is an explicit conversion of any unsealed type to any type of interface, since there may be a derived type that implements the interface. But the string is sealed, so the error should just be "no conversion".
Eric Lippert
source share