Got more questions? Find advice on: SQL | XML | Regular Expressions | Windows
in Search
Welcome to AspAdvice Sign in | Join | Help

Browse by Tags

All Tags » dotnet » generics
  • From the odder than odd dept

    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 {       ...
    Posted to C# Nuggets (Weblog) by rbirkby on October 24, 2006