Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why doesn't this require a cast?
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01026305
Message ID:
01026402
Views:
20
>> 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
Previous
Reply
Map
View

Click here to load this message in the networking platform