Re: VisualBasic.Compatabilty . Goto
Peter Vertes <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.advanced |
|---|---|
| Message-ID | <[email protected]> |
I think this would be an excellent case for one of my favorite tools; ReSharper :) On Mon, Jan 26, 2009 at 10:16 AM, Davy J <[email protected]> wrote: > Dear Ladies and Gentlemen, > > I present for you delectations tonight the one and only GOTO. > > try > { > int iCnt2 = 1; > > Common cm = new Common(); > tryagain: > > try > { > oWait.WaitOne(); > if (!FTPClients.AddFTPClient(ftp)) > { > ScheduleStatus.AddEditSchedule(new > ScheduleInfo(_schedule.scheduleID, "Downloding Waiting " , > DateTime.Now.ToString(), _schedule.providerName, _schedule.customerName, > _schedule.contractName, "")); > oWait.ReleaseMutex(); > if (cm.WatchAgain(ref iCnt2)) > { > goto tryagain; > > } > } > > The above code is in a C# application that I'm auditing, one of the > developers at some stage has added a reference to VisualBasic.Compatabilty > so that they could use the goto statement, luckly this isn't in a > production > environment yet. Apart from being very very ugly and a huge kludge can > anyone give me some good reasons to remove the VisualBasic.Compatiblity > assembly and as a by product get them to refactor this code? > > Thanks. > > Dave. > > =================================== > View archives and manage your subscription(s) at > http://peach.ease.lsoft.com/archives > =================================== View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives