Reputation: 348
using System;
namespace test
{
public class multiplying
{
public static void Main( string[] args);
{ //getting invalid '{' token here
int number1;
int number2;
int total;
}
}
} // getting type of namespace definition, or end-of-file expected error here
The programme isn't finished obviously but when I write more in I just get more errors so there must be something wrong here but I don't know what.
Upvotes: 0
Views: 6320
Reputation: 54302
I'm not that familiar with C#, but I think this is your problem:
public static void Main( string[] args);
{ //getting invalid '{' token here
;
is ending the declaration, so the {
is considered completely separate (and don't make sense without a function signature coming first. Try changing it to this:
public static void Main( string[] args)
{
Upvotes: 2
Reputation: 2927
You have an extra semi-colon here : public static void Main( string[] args);
Upvotes: 3
Reputation: 160982
public static void Main( string[] args);
You have an extra ;
there.
Upvotes: 2
Reputation: 82654
public static void Main( string[] args);
should be
public static void Main( string[] args)
Upvotes: 4