devxlogo

Tip Bank

A generic benchmark routine

You often need to benchmark a piece of code, which you usually do as follows: Dim start As Date = Now’ insert here the code to benchmarkDim elapsed As TimeSpan

Create zero-elements arrays

The .NET framework lets you create two types of “empty” arrays: unitialized arrays and arrays that are initialized with zero elements. Uninitialized arrays are actually array variables that are set

Retrieve file version information

The System.Diagnostics.FileVersionInfo class lets you easily read file version information without having to call Windows API functions (as you have to do under previous VB versions). This class has a

Reduce context overhead for COM+ components

Instances of configured components, that is, components configured in COM+, get runtime services owing to context objects. When you instantiate a COM+ component, your instance will live in a context