https://bugzilla.novell.com/show_bug.cgi?id=667418
https://bugzilla.novell.com/show_bug.cgi?id=667418#c1 Sebastien Pouliot <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Sebastien Pouliot <[email protected]> 2011-02-10 00:18:20 UTC --- So the pattern in VB looks like: Sub Foo (ByVal bar As Bar) If Information.IsNothing (bar) Then Throw New ArgumentNullException ("bar") End If ... End Sub which, translated in C#, would be: void Foo (Bar bar) { if (Information.IsNothing (bar)) throw new ArgumentNullException ("bar"); .... } instead of the more common (at least in C# ;-): void Foo (Bar bar) { if (bar == null) throw new ArgumentNullException ("bar"); .... } Adding a call to Information.IsNothing makes the code "large enough" to be considered a pattern. In turns this means many methods will have the same pattern and the rule will report them. For a short term solution I believe you could do the same "direct" (no call) null-check in VB.NET, which would not report defects. Ideally we would ignore it (but that could be complex or maybe, gasp, a special "VB-case"). I'll look into this again once 2.10 is released. Thanks for the test cases :-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
