Monthly Archives: February 2010

Casting an ArrayList to a typed array

This caught me out today. When converting an ArrayList to a typed array, remember to cast the array returned by ArrayList.ToArray() string[] arr = (string[]) arrayList.toArray( typeof( string ) ); Advertisements

Posted in ASP.NET, Gotchas | Tagged , , | Leave a comment

The Inevitable First Post!

[ I’ve edited this post as i’ve just moved my blog to this new address and am no longer working for Offroad Code. It seemed appropriate to update this first post whilst i was at it! ] Never wanted a … Continue reading

Posted in Random Stuff | Leave a comment