devxlogo

Tip Bank

Passing Objects ByVal in VB

You can pass Object parameters to a sub ByVal just as you pass other parameters. But what is the difference between passing Objects ByVal and ByRef, since an object variable

Declaring Destructors Virtual

Writing basic classes needs no more definition from the programmer than just declaring a few member functions and variables. But, what if you needed to design a class that was

Remove a Character From a String

Use the following code: Public Function RemoveChar(ByVal str As String, ByVal strChar As String) As String ‘ Function: RemoveChar ‘ ‘ Desc: Extracting requested character from given string. Return value

A Way To Nest Multi-line Comments

You can use #ifdef & #endif to comment out a block of code that already has multi-line comments.For example: #ifdef COMMENTThis #ifdef removes all nested Code & Comments Code…/* Comments…*/

Understanding Linked Lists

A linked list is a dynamically created area where data can be stored. It contains certain algorithms for collecting data (alphabetically, numerically, etc.). This is like an array but an

Nested For Loop Optimization

You can declare the counter of even the most deeply nested loop as a ‘register’ variable. For example: for (int i = 0; i < 100; ++i){ for (register int