Tip Bank

DevX - Software Development Resource

How to Detect a User’s Language Settings

User language settings can be detected in one of the two following ways: Using the cultureinfo class current culture property: Using the request object’s userlanguages collection: Note: The UserLanguages collection

DevX - Software Development Resource

Initializing Class Members

The following code demonstrates how to initialize class members in the initialiser list for more efficiency: class A{int a;char b;float c;public: A();};A::A():a(0),b(0),c(0){}is more efficient thanA::A(){ a = 0; b =

DevX - Software Development Resource

Changing the Attributes of a File

Say you’re trying to overwrite an existing file, but its attribute is set to “Readonly,” so it generates a “Permission Denied” error. The following code shows how to change the

DevX - Software Development Resource

Handling a Final Empty Parameter

The StringTokenizer and the Missing Token tip tells us how to cater for empty parameters, for example in the comma delimited string following: token1,token2,,token4,,,token7 The tip works well, with the

DevX - Software Development Resource

Bit Shifting in VB

The basic principal of this function is to divide the decimal number by two for bit number of times (if that makes sense). So, if bit 30 was to be

DevX - Software Development Resource

Two-dimensional Arrays

Data that is in rows and columns is usually stored in 2-dimensional arrays. Two-dimensional arrays are declared by specifying the number of rows then the number of columns. Unless specified,