-
You can remove it like this:
try { doSomething() } catch (AmbiguousMatchException) { doSomethingElse() } -
Use warning disable like this:
try { doSomething() } #pragma warning disable 0168 catch (AmbiguousMatchException exception) #pragma warning restore 0168 { doSomethingElse() }
Other familiar warning disable
#pragma warning disable 0168 // variable declared but not used.
#pragma warning disable 0219 // variable assigned but not used.
#pragma warning disable 0414 // private field assigned but not used.