[Mono-list] Important difference with Microsoft compiler
Erik Bågfors
erik@bagfors.nu
14 Mar 2003 11:23:39 +0100
I don't think that having a Main outside of a class is legal in c#. I
can't see how this should compile on any c# compiler. I sure doesn't
compile under mcs for me.
: [bagfors@detrius]$ ; mcs test5.cs
syntax error, expecting CLASS DELEGATE ENUM INTERFACE STRUCT
test5.cs(5) error CS-0025: : Parsing error
Mono.CSharp.yyParser.yyException: irrecoverable syntax error
in <0x00701> 00 Mono.CSharp.CSharpParser:yyparse
(Mono.CSharp.yyParser.yyInput)
in <0x00075> 00 Mono.CSharp.CSharpParser:parse ()
/Erik
On Fri, 2003-03-14 at 09:52, Gustavo García Bernardo wrote:
> Hi everybody,
>
> The next code doesn't compile with Microsoft compiler but compiles with
> mono mcs:
>
> class A
> {
> };
> static void Main(string[] args)
> {
> for (int i=0;i<10;i++)
> {
> A a = new A();
> }
>
> A a = new A();
> }
>
> I think the right operation is in mono. Is this documented?
>
> G.
>
> _______________________________________________
> Mono-list maillist - Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
/Erik
--
erik@bagfors.nu
fingerprint: 6666 A85B 95D3 D26B 296B 6C60 4F32 2C0B 693D 6E32