Welcome to AddressOf.com Sign in | Join | Help

CodeSmith - Strongly-typed ArrayList collection for VB.NET

I've completed the conversion for the ArrayList.cst and IList.cst C# source files distributed with CodeSmith to VB.NET (all 2752 lines of it ;-) ).  Assuming I don't have any conversion bugs left it in (I've done some testing and it's working great for my purposes).  My goal was to keep the translation as close as possible to the original C# source, however, I discovered that the original code was not generating FxCop compliant code.  I've made a few improvements in this regard (only two messages instead of the five that the C# code has).

You can download the templates here.

If you run into any problems (or if you make improvements to the templates), please let me know.

[update] Thanks to Brian Manchester for pointing out a bug in the ToArray method.  This has been corrected and the available download reflects this change.

Published Friday, June 18, 2004 6:30 PM by CorySmith
Filed under: ,

Comments

# CodeSmith - Strongly-typed ArrayList collection template for VB.NET

Sunday, June 20, 2004 2:20 PM by Eric J. Smith's Weblog

# re: CodeSmith - Strongly-typed ArrayList collection for VB.NET

Tuesday, July 27, 2004 5:34 AM by Karl
I'm getting an invalid cast excpetion in this method. Idea as tot he cause? I'm new to codesmith.

Protected Sub ICollectionCopyTo(ByVal array As Array, ByVal arrayIndex As Integer) Implements ICollection.CopyTo
CopyTo(CType(array, Race()), arrayIndex)
End Sub

Thanks

# re: CodeSmith - Strongly-typed ArrayList collection for VB.NET

Saturday, October 9, 2004 4:49 AM by Ben Hyrman
Many thanks for doing this conversion. It's been a huge time-saver with a rather pressing project.

# re: CodeSmith - Strongly-typed ArrayList collection for VB.NET

Monday, December 12, 2005 2:43 AM by Amin
whet is collection?. why we use collection.
plz explain it briefly
thanx

# re: CodeSmith - Strongly-typed ArrayList collection for VB.NET

Thursday, March 23, 2006 1:54 AM by Senthil
Need more detail about Arry List
Anonymous comments are disabled