tag:blogger.com,1999:blog-804807863784809914.post505197154754797136..comments2024-03-28T09:46:41.753+01:00Comments on Legend and truth: Exposing collectionsPatrik Hägnehttp://www.blogger.com/profile/09722697680972465898noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-804807863784809914.post-37976511701894755562009-06-26T11:26:24.316+02:002009-06-26T11:26:24.316+02:00Since it's not a list you can not _cast_ it to...Since it's not a list you can not _cast_ it to one, however you could use the extension method "ToList" from the Linq-namespace. Or you could use "new List<YourType>(theCollectionYouHaveAtHand)".Patrik Hägnehttps://www.blogger.com/profile/09722697680972465898noreply@blogger.comtag:blogger.com,1999:blog-804807863784809914.post-13737286679164757572009-06-25T20:04:28.082+02:002009-06-25T20:04:28.082+02:00I know the point to this post is to NOT expose a L...I know the point to this post is to NOT expose a List. However, if I want to consume the collection and cast it to a List<T>... how would I do that? I tried some code and get an error saying the cast from the generic collection to List is invalid.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-804807863784809914.post-87467199513390290822009-03-25T21:05:00.000+01:002009-03-25T21:05:00.000+01:00I think that the converter at http://www.developer...I think that the converter at http://www.developerfusion.com/tools/convert/csharp-to-vb/ should take care of this just fine.Patrik Hägnehttps://www.blogger.com/profile/09722697680972465898noreply@blogger.comtag:blogger.com,1999:blog-804807863784809914.post-6518656155856481252009-03-24T19:45:00.000+01:002009-03-24T19:45:00.000+01:00Do you have a VB.Net conversion of your generic co...Do you have a VB.Net conversion of your generic collections class?Anonymousnoreply@blogger.com