Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why doesn't this require a cast?
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01026305
Message ID:
01026402
Vues:
21
>> Your foreach is iterating over the rows collection, and it is pulling out one row object at a time.

That part I get, what I didn't get at first was why I didn't have to cast from a DataRow to my typed row. Then I checked out the IL, and saw this:
IL_001f:  castclass  NMUG.Business.UsersDataSet/rb_UsersRow
So apparently the compiler is making the cast for me. I didn't know C# did that.

Mike
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform