This is an answer to a question in C++ area.
http://www.daniweb.com/software-development/cpp/threads/355232
It should be ready to be modified to code in C++, C#, or Java, because VB.Net is fully OOP. Even though it can be used for vectors, you may still want to modify it to a Vector Class.