Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
Search the Tips
Tip Bank > .NET > VB.NET > Arrays

Arrays

1-20 of 97     Previous     Next
Use Enumeration Instead of SAFEARRAY to Get an Array's Elements
by Shao Voon
C++'s SAFEARRAY is difficult to use. A better option is to enumerate an array's elements by repeatedly calling your own custom enumeration function and incrementing the element index.
Use Array Predicates to Simplify Searches
by Srinath MS
Predicates can often eliminate the need to write loops and iterations over arrays.
Using String.split(String) vs. Using a StringTokenizer
by Hrudananda Pattanaik
It's not always safe to use String.split(String). Consider using the String Tokenizer API instead.
Returning Zero-Length Arrays in Java
by Nagaraj Ramesh
Define a static final zero-length array and return that rather than null from methods that return array types.
Convert Hashtable Keys or Values into an ArrayList
by Deepak Choudhari
The key is to use the ArrayList constructor that takes an ICollection.
Be Careful of Negative Array Indices
by Akash Aggarwal
Negative array indices can cause unexpected behavior when porting an application from 32 to 64 bits.
Trimming Items in a String Array
by Arsalan Tamiz
When you use a For Each loop to iterate through a String Array and perform some action with each item, the change doesn't affect the String Array itself.
Create XML from an Array
by Cindy Rodriguez
Passing arrays as arguments to stored procedures is not currently possible in SQL Server, but you can use XML to accomplish this.
Create Two-Dimensional Arrays in the Heap
by Arman Sahakyan
This code demonstrates how to create two-dimensional arrays in the heap.
Using System.arraycopy(.....)
by MS Sridhar
Learn how to use System.arraycopy(.....) to copy the contents of an arrary for processing.
Making Complex Arrays
by Sunil Kidambi
Learn how to make a vector of a list of associations.
The Remove_if() Algorithm
by Alan Reynolds
It's easy to fall into the trap of thinking that the remove_if() algorithm moves the items that you wish to be deleted to the end of the vector prior to erasure. A number of Web pages also give this impression. Don't believe them!
Arrays of Functions
by David Bandel
Creating arrays of function pointers lets you pass functions as arguments at runtime even when you don't know the exact function needed at design time.
Arrays as Pointers in C++
by Sachin Kainth
Because the elements of an array are stored in consecutive memory addresses on the computer and the name of the array is equivalent to the address of the first element in it, it's easy to use pointers instead of subscripts to read and write the values of an array.
Retrieving Only Unique Elements from Two Sets
by Mykola Rozhok
This algorithm helps you to retrieve all the elements contained in the first set (set1), but not in the second (set2).
Read the Entire Text Element
by Amit Jain
SAXParser's specifications allow parsers to split text data into multiple arrays and call characters multiple times.
Display itemdata in a ComboBox
by Nkata Levi
This code shows how to display specific itemdata in a ComboBox.
Using Sort with Arrays
by David Faden
This tip explains how to use STL's sort with an array and lists some of the advantages of STL's sort over qsort.
Increase Instance Capacity by Ten Percent
by Amit Jain
Find out how an undocumented feature of ArrayList can help you boost your instance capacity by ten percent.
Using the ostream_iterator()
by Saurabh Ramya
This iterator works in conjunction with STL algorithms, allowing you to perform a variety of actions besides merely reading the elements of a container.
1-20 of 97     Previous     Next
Sitemap