|
|
Browse by Tags
All Tags » dotnet » generics
-
Can anyone tell me why the commented out line fails to compile, whereas the next line succeeds? Sure, it's a runtime vs compiletime thing, but why does C# prevent me from casting from a string to (T), whereas the very next line it lets me cast from an object to (T).
using System;
class X {
...
|
|
|