Last post Mar 25, 2009 03:38 AM by David Anton
Mar 24, 2009 02:55 AM|Suneeti|LINK
Is there anything that can be used to group code within method body in vb.net.#region works fine in C#.NET but not in VB.NET.
Mar 24, 2009 05:16 AM|HosamKamel|LINK
#Region "Region Name"
... code ...
Mar 24, 2009 08:43 AM|MisterFantastic|LINK
By what reason you are telling its not working fine in VB.Net ?
Whats the problem you are facing ?
Mar 24, 2009 10:29 AM|David Anton|LINK
You are correct: #Region / #End Region is not allowed within a method in VB, although it is allowed in C#.
You should refactor to extract logic out of a long method into other methods.
Mar 25, 2009 12:03 AM|Suneeti|LINK
Then what to use.is there anything like region in vb.net that can be used within method body.
Mar 25, 2009 03:38 AM|David Anton|LINK
No - nothing like #Region exists within a method body.