During team development, every time the latest version of the project file is obtained through the version control software and compiled, the vs Error List will always display the following prompts:
Although the project is compiled and runs normally, it is uncomfortable to see several or even dozens of hundreds of warnings in different projects each time. Lou pig is a bitCodeIf the project was not very tight, and the project was very energetic and time-consuming, Jie Li would also stick to his perfectionist preferences to the end, so he could not help but boldly refactor the code in other projects, however, it is sometimes found that such warnings are a "slow strategy" for other developers, such as the following code:
Internal void dosomething () {try {// some code here for doing something} catch (exception ex) {// throw ex; // to do write exception logs }}
After analyzing the dosomething function, we found that the developer has already marked "to do" in the exception handling area. It may be because it has not been processed for some reason, appropriate code will be added in the future development. The warning information can be properly blocked by pre-processing commands (refer to msdn) without affecting the function:
Internal void dosomething () {# pragma warning disabletry {// some code here for doing something} catch (exception ex) {// throw ex; // to do write exception logs }}
Only one row# Pragma warning disableAnd the warning information is gone. If you need to complete the code in the future, find the command or "to do" mark through the vs search function.