Hi everyone!!!

I'm getting the following result from the execution of the attached program:
1.- namespace ComputerSpeaks {
2.-  using System;
3.-  using System.Text;
4.-
5.-  class HelloWorld {
6.-
7.-    public static void () {
8.-      System.Text.StringBuilder sbMessage = new
System.Text.StringBuilder();
9.-      Console.WriteLine(sbMessage.ToString());
10.-  }
11.- }
12.- }

The problem is in line 7:
      public static void () {
                               ^^
it doesn't generate the name of the method: Main.

I'm using mono 0.19 installed from rpm, taking a look at a snapshot more
recent than 0.19's version
(January 20, sorry but i was unable to download a more recent snapshot) I
can see in System/Microsoft.CSharp
CSharpGenerator.cs:

protected override void GenerateEntryPointMethod( CodeEntryPointMethod
method,
          CodeTypeDeclaration declaration )
  {
   method.Name = "Main";
   GenerateMethod( method, declaration );
  }

and in the line 498 of the GenerateMethod method:
  output.Write( method.Name );

so it seems to me that perhaps the problem is with the 0.19 code, can anyone
please confirm if the attached
program generate the correct result using a version of mono more recent than
0.19????
In case the problem with 0.19 is confirmed can anyone from the mono team
tell me when would be a 0.20 release???

TIA,
  Ali





Attachment: code2.cs
Description: Binary data

Reply via email to