June 15, 2004

Accept Multiple Arrays as Parameters

Passing multi-dimensional arrays to routines is different in VB.NET. Say you have a two-dimensional array called aStrMy2DArray(10,1) as a string data type: Private Sub MyRoutine(ByVal aStrMy2DArray as String (,)) ‘ aStrMy2DArray as String (,) putting a blank parenthesis ‘ with comma to define the number of your dimension ‘ one

Execute a .jar File Without All the Usual Debugging

In order to execute a .jar file using Java’s -jar jarfile command, the manifest file needs to have the classpath defined. This would look something like: Manifest-Version: 1.0Sealed: trueMain-Class: com.CalculatorClass-Path: “C:Javaantlibant.jar” So the execution command would be: java jar calculator.jar If this is not defined, you will get an error.

Retrieve Specific Nodes When They Contain an xmlns Namespace Parameter

When an XML file contains a xmlns parameter, you can’t use simple SelectSingleNode to retrieve a specific node. Take the following code, for example: 31 Now, try to run the following code with the above XML: Running the above code will generate the following error message: System.NullReferenceException: Object reference not

Copy Multiple Items in the Clipboard

Many times during coding you feel the need to keep more than one block of code in your clipboard.Visual Studio provides a wonderful feature for this using the clipboard ring. It also provides a keyboard shortcut to access the clipboard ring. To add the block of code to memory, select

Customize Your Template Function

If a function instantiated from a generic template definition does not suit your need, it’s possible to provide a specialized definition for that function template instantiation. Take a look at this: template type min (type t1, type t2) { return (t1