|
-
November 23rd, 2012, 04:01 AM
#2
Re: Help With Project Please
Here's a constructor definition:
Constructor()
Here's a method definition that returns something:
string Method()
Here's a method definition that returns nothing:
void Method()
So we can see that the compiler uses a logic like "if there is a word before the method/constructor name that is a Type, like 'string' or 'void' then it is a method, if there is no word (because constructors don't return anything of any type), then it is a constructor
Using this info, can you work out what's wrong with your code?
Code:
private static Main(string dirPath)
Hints:
From the error message, it's clear to see tha tthe compiler thinks your line of code above is a constructor (when it actually needs to be a method) - can you work out why
You may find your main needs a string array as a parameter
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|