[Mono-devel-list] [PATCH] Fix "neutral" sorting in DataView
atsushi at ximian.com
Thu Jul 21 11:18:55 EDT 2005
> Oh dear... luckily I now managed to write the stuff today. I've wasted two and
> a half hours just for that silly test ! Would anyone care to explain to me
> why the line
> Assert.AreEqual (1, 2, "Foo");
> causes mcs to complain "error CS0119: Expression denotes a `method group',
> where a `variable', `value' or `type' was expected" ?
Because there is both Assert class and Assert method in that scope.
Since the test class is derived from Assertion, it guesses "Assert"
is NUnit.Framework.Assertion.Assert method, not NUnit.Framework.Assert
So if you want to use static Assert methods, you can use alias by
using statement, like:
using AssertType = NUnit.Framework.Assert;
and call AssertType.AreEqual().
More information about the Mono-devel-list