一个1000行左右的c#程序中,充斥100多行的goto语句,该怎么改?能直接改为continue to或者break to语句吗?其他还好办。。。。
阿神2017-04-17 17:11:47
More than a hundred lines of goto...
I have been writing C# for several years...I have never used goto...(sad)
ringa_lee2017-04-17 17:11:47
Let alone goto, it is wrong to write more than a hundred lines for a function.
ringa_lee2017-04-17 17:11:47
1. Is there documentation for these codes? Is there a specification document? Is there a requirements document?
If there is a specification document, rewrite it according to the specification document. The core algorithm can refer to C#. If there is unsupported syntax, use alternative syntax to implement it (goto is nothing more than used to implement loops, recursions, judgments, etc.)
If there is no specification document, it will be fine if there is a requirement document. Rewrite the specifications according to the requirements document, and then write the program. You can also refer to the C# code.
2. There is no documentation.
Understand the code, then write specification documents, and then develop JAVA.