In a visual basic 2008 console application, I need to split up some an extrmely large method into lgocial groups based upon the new logic I need to add. Thus I have the following questions:
1. If i keep the code the way it basically exists in a large method, how can I make the code go to the end of the method? Basically from my if statment certain code would happen and then I want to go to the end of the method.
2. From the place where I would do the if statement, I would break the large method into two methods. From this if statement, i would do the new code or setups the rest of the code into this new method using most of the existing logic. However when I setup this new method, how would I know what objects I need to pass to the new method?
If i keep the code the way it basically exists in a large method, how can I make the code go to the end of the method?
Methods should really not be very large. You need to think about maintainability and readability. If you are lumping everything into one large method, you could start running the risk of having a difficult time debugging the method if something were to go wrong. It does not hurt to look into refactoring the code
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
Last Visit: 31-Dec-99 19:00 Last Update: 2-May-16 15:28