I have created simple Console.WriteLine function, on building it says build failed. But doesnt show any error / warning
Asked
Active
Viewed 1,173 times
1
tbhaxor
- 1,315
- 2
- 9
- 35
-
Do you understand _why_ it doesn't compile? – mjwills May 09 '20 at 06:52
3 Answers
-1
Check your build output. Sometimes you will have information about the error in the output.
example:
psj01
- 2,723
- 5
- 25
- 56
-2
Program class should be declared as public
public class Program
{
public static void Main()
{
Console.WriteLine(1);
}
}
as-if-i-code
- 1,751
- 1
- 7
- 15
-
-
It will never get compiled without `public` specifier for `Program`. See the exact error [here](https://dotnetfiddle.net/5hkYvw). You might have removed it unknowingly. – as-if-i-code May 09 '20 at 07:26
-
-