in

Blog By Bob

Blog by Bob

Staring me in the Face

Sometimes, well, often even, I amaze myself with my own stupidity. I have been disgruntled for awhile because you can't make a region token multiline, so you can do something like

My Magic Method

but you can't do something like

My Magic Method
Is Better Than
Your Magic Method

and then one day the solution light bulb popped on and I could not believe how in the hell I had not thought of it soon. And the change to my coding/commenting style is minor

#region My Magic Method
/// <summary>
/// This method does magic as many times as the NumberOfTime sent to it
/// </summary>
/// <param name="NumberOfTimesToDoIt">int for how many times to do magic</param>
public void SomeMagicDo(int NumberOfTimes)
{
    10 PRINT
"Doing some magic";
    20 GOTO 10;
}
#endregion

versus

/// <summary>
/// This method does magic as many times as the NumberOfTime sent to it
/// </summary>
/// <param name="NumberOfTimesToDoIt">int for how many times to do magic</param>
#region My Magic Method
public void SomeMagicDo(int NumberOfTimes)
{
    10 PRINT
"Doing some magic";
    20 GOTO 10;
}
#endregion

 BLAM! I always had my multiline region ability, I just didn't realize it, and noone took pity and told me.

This post brought to you by Coding With Line Numbers ®

Published May 16 2007, 11:54 AM by Bob

Comments

No Comments

Leave a Comment

(required)  
(optional)
(required)  
Add
Copyright © :: BlogByBob.com
Powered by Community Server (Non-Commercial Edition), by Telligent Systems