|
-
May 3rd, 2008, 08:32 AM
#1
Usage of #region ,#undefine
What is usage of #region and #undefine in C#.NET?Please by example
-
May 3rd, 2008, 09:03 AM
#2
Re: Usage of #region ,#undefine
I use #region all the time. it is a way to keep similar code blocks together. This is the way that I use it.
Code:
#region Button Click Events
...... All of my button click events .....
#endregion
It will now allow me to collapse all of the button click events into one line. For me, it helps keep the code looking cleaner.
-
May 3rd, 2008, 12:25 PM
#3
Re: Usage of #region ,#undefine
 Originally Posted by Abalfazl
What is usage of #region and #undefine in C#.NET?Please by example
Won't MSDN have all the information that you are looking for?
Look at #undef
-
May 3rd, 2008, 10:33 PM
#4
Re: Usage of #region ,#undefine
#region is a code view only decoration that is used by coders who write bloated code.
I cringe most times I see them used because its typically used to collapse hundreds of lines of useless code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|