Getting CS1002 even though I have ;

View: New views
6 Messages — Rating Filter:   Alert me  

Getting CS1002 even though I have ;

by iskai :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I just installed Mono 1.9 onto a fresh MacBook using the binary release. First I wrote a hello world application, which worked file. Then I expanded it a little to see if file io worked properly.

Now i'm getting all kinds of errors. The program shown below is valid but the compiler believes otherwise. Before this (i recreated this project from scratch) the compiler insisted that I was missing the 'class' keyword from line 9 - even though it was on line 8.

Does anybody have any idea why this isn't working?

Picture+2.png

Re: Getting CS1002 even though I have ;

by Iggy MA :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I don't think it should matter but have you tried making your MainClass public?


http://iggyma.blogspot.com/



iskai wrote:
I just installed Mono 1.9 onto a fresh MacBook using the binary release. First I wrote a hello world application, which worked file. Then I expanded it a little to see if file io worked properly.

Now i'm getting all kinds of errors. The program shown below is valid but the compiler believes otherwise. Before this (i recreated this project from scratch) the compiler insisted that I was missing the 'class' keyword from line 9 - even though it was on line 8.

Does anybody have any idea why this isn't working?

Picture+2.png

Re: Getting CS1002 even though I have ;

by iskai :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Thanks for the response. I tried to make the class public but that had no effect. This is driving me crazy!

Iggy MA wrote:
I don't think it should matter but have you tried making your MainClass public?

Re: Getting CS1002 even though I have ;

by Bryon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Thanks for the response. I tried to make the class public but that had no effect. This is driving me crazy!

Iggy MA wrote:
Just share my opinion.
It seems "Console.WriteLine()", not "Console.Writeline()" [line 18]

Aware of the "l", It should be Capital Letter !!!


Re: Getting CS1002 even though I have ;

by iskai :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Oh yeah. I hadn't spotted that but then neither did the compiler. Odd.

I guess that would've been picked up in the linking phase.

Bryon wrote:
Just share my opinion.
It seems "Console.WriteLine()", not "Console.Writeline()" [line 18]

Aware of the "l", It should be Capital Letter !!!

Re: Getting CS1002 even though I have ;

by iskai :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Huzzah!

The problem was invisible characters that I think were generated when I tried to use visual studio CTRL+key keyboard shortcuts.

MonoDevelop doesn't show these invisible characters - not by default at least. I had to use a hex editor to see the invisible chars.