В чём проблема? Я новичок в C# но строил программу взяв информацию из курса, однако код не компилится | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

В чём проблема? Я новичок в C# но строил программу взяв информацию из курса, однако код не компилится

using System; void Main() { public void writeln(int Numb) {Console.WriteLine(Numb);} public void writeln(string Txt) {Console.WriteLine(Txt);} writeln("Hello, World!"); }

1st Sep 2017, 11:41 AM
Gatarios
Gatarios - avatar
7 Answers
+ 7
@Criterios, Вам нужен класс для запуска программы You need a class to run a program.
1st Sep 2017, 12:22 PM
Shamima Yasmin
Shamima Yasmin - avatar
+ 16
Translation: "What is the problem? I'm new to C# and I built the program by taking the information from the course, but the code does not compile"
1st Sep 2017, 11:45 AM
Hatsy Rei
Hatsy Rei - avatar
+ 8
please don't downvote this post.....the person is only asking for help!!!
1st Sep 2017, 12:04 PM
cHiRaG GhOsH
cHiRaG GhOsH - avatar
+ 7
Другие функции записываются внутри основной функции, они должны быть написаны отдельно The other functions are written inside main function, those should be written separately.
1st Sep 2017, 12:00 PM
Shamima Yasmin
Shamima Yasmin - avatar
+ 5
@Criterios, Make the functions "static" https://code.sololearn.com/ctRvu4XbxAY4/?ref=app
1st Sep 2017, 12:09 PM
Shamima Yasmin
Shamima Yasmin - avatar
+ 2
@Shamina_Yasmin Это не решает проблемы
1st Sep 2017, 12:02 PM
Gatarios
Gatarios - avatar
+ 1
@Shamima_Yasmin Тогда вопрос: Вы добавили "class", можно ли написать код выполняющий действие "Вывод" без добавления "class"? Then the question is: Did you add "class", can I write code that does the "Output" action without adding "class"?
1st Sep 2017, 12:14 PM
Gatarios
Gatarios - avatar