Re: Avoiding the warning of not using Exception variable in catch

From: Michael H (Michael_at_Strawberry.Gatorade.yum)
Date: 02/27/05


Date: Sat, 26 Feb 2005 21:54:51 -0800

On Sat, 26 Feb 2005 22:33:35 -0700, "Jack Addington"
<jaddington@shaw.ca> wrote:

>I have a 3rd control that throws an exception if the syntax of a method call
>is incorrect. I am passing dynamic strings to that method so it is
>acceptable that the method will fail. I have my try...catch setup as
>
>try{ ...}
>catch(Control.StrangeException sEx){ }
>
>I get a compiler warning that I am not using sEx. I don't want to do
>anything if the method fails and I would like the warnings to go away... any
>ideas?
>
>thx
>
>jack
>

the command line paramater would be /w:0

like:

C:> csc.exe myApp.cs /w:0

Michael Hughes - Silverton, Oregon
http://wou.ath.cx/Trivia
http://wou.ath.cx/AmateurRadio



Relevant Pages