[Mono-list] Wrong error message given by mcs
Detlev Offenbach
detlev@die-offenbachs.de
Fri, 10 May 2002 12:13:59 +0200
--------------Boundary-00=_BF4W89PDISP6VUFB2L9M
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 8bit
Hello,
I am starting to learn C# using mono. The attached example taken from
"Programming C#" doesn't compile as expected. However, the errormessage
given by mcs (version 0.11) is not correct as it doesn't indicate the
real problem of the code. The error I got was
./ex2-4.cs(5) error CS0103: The name `WriteLine' could not be found in
`Hello'
What I expected was something saying that using is only allowed with
namespaces and that Console is a class.
Regards
Detlev Offenbach
--
Detlev Offenbach
detlev@die-offenbachs.de
--------------Boundary-00=_BF4W89PDISP6VUFB2L9M
Content-Type: text/x-c++src;
charset="us-ascii";
name="ex2-4.cs"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="ex2-4.cs"
using System.Console;
class Hello {
static void Main() {
// Console from the System namespace
WriteLine("Hello World");
}
}
--------------Boundary-00=_BF4W89PDISP6VUFB2L9M--