I believe the term you are going for is macro, not micro. A macro is a piece of code that gets replaced by another piece of code at compile time, before the compilation process proper begins. This is called macro expansion, and in C is mostly used as a way of getting the effect of a function without as much overhead. In C and C++, a macro is defined by a pre-processor statement, #define, which indicates that the macro name and parameter list immediately following the #define should be expanded to the . For example, the simple macro:
#define PI 3.1415
... in the following code
area = PI * r * r;
is textually expanded to
area = 3.1415 * r * r;
Note that this is an exact replacement of the string 'PI' with the string '3.1415' in the code itself; the compiler doesn't see the actual PI, just the 3.1415. This is important because there is no type checking or other protection in macros; if you had a macro:
#define SQUARE(x) x * x
and applied it to a sum,
area = PI * SQUARE(2 + 12);
you would get
area = 3.1415 * 2 + 12 * 2 + 12;
which almost certainly isn't what you intended.
For the macro you showed, things get a little more complicated, because it uses the dtringifying operator, #. What this does is cause the macro argument to be inserted as a C string into the macro expansion. The macro expansion for the invocation given would be:
Thus, for the code above, the result would be to print out, str == uday.
BTW, the main() function should always be delcared a returning an int value, and should return zero for a successful completion. The use of void main() was legal in older C code, but was never standard.
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...