Tip Bank

DevX - Software Development Resource

Copying data into the Clipboard

Copying a piece of information into the clipboard is as easy as calling the Clipboard.SetDataObject: you can pass this method a string, an image, and so on. If you pass

DevX - Software Development Resource

Boolean Conversion

Numeric values and pointers are implicitly converted to a Boolean value in conditional expressions. For example: void *p = get_ptr();if(p){ // process p} A zero value evaluates as false. All

DevX - Software Development Resource

Notes about the system() Function

The system() function (declared in ) launches another program from the current program. As opposed to what most users think, it doesn’t return the exit code of the launched process.

DevX - Software Development Resource

Using Pointers as Integers

In the early days of C, pointers were plain integers. Relics of this approach can still be found in vintage APIs and legacy code. For instance, the ANSI C header

DevX - Software Development Resource

A Recommended Exception Handling Policy

Exceptions report abnormal runtime situations. Although you have other mechanisms for detecting and reporting runtime errors, exceptions are advantageous because they automate the process of passing the error from a

DevX - Software Development Resource

Uses of the

The volatile specifier disables various optimizations that a compiler might automatically apply and thus introduce bugs. I

DevX - Software Development Resource

Create a Touch utility

The SetCreationTime, SetLastWriteTime, and SetLastAccessTime methods of the System.IO.Directory class let you modify the date attributes of a file or directory: ‘ Change the access date- and time of all