#pragma warning [disable/restore]
The
...warning CS0168: The variable 'ex' is declared but never usedYou can use the #pragma directive to specifically ignore one or more warnings. For Example:
#pragma warning disable 0168You can add multiple entries by separating them with a comma. It is also a good idea to comment the directive so that others can understand what is being suppressed.
//Disabling: warning CS1591: Missing XML comment for publicly visible type or member 'val' for this classYou can restore the warnings by replacing disable with restore. For more information you can visit http://msdn.microsoft.com/en-us/library/441722ys.aspx
//Disabling: warning CS1717: Assignment made to same variable; did you mean to assign something else? [then your reason]
#pragma warning disable 1591, 1717
0 comments:
Post a Comment