One of the reasons I don't view anonymous types as being too bad is that they're nicely confined to methods. You can't declare the type that you're returning from a method if it's anonymous (or if one of its type arguments is generic, e.g. a List<T>
where T
is an anonymous type and T
isn't a type parameter to the method itself). However, you can get around this if you're sneaky.
I've always known that...Full Article.
No comments:
Post a Comment
Post your comments here: