+ 1

Why it is not working ? C#

Your graphic application needs to report that a new project has been created successfully once the "Create" button has been pressed. Complete the given class by adding a constructor that will show message "Project created" once the operation is done. class Project { public Project () { Console.WriteLine("Project Created"); } } static void Main(string[] args) { Project project = new Project(); }

29th Aug 2021, 3:35 PM
Katerina UA
Katerina UA - avatar
7 Answers
+ 1
I didn't know that it was an exercise from the C# lesson. You need to use a small 'c' for created.
29th Aug 2021, 7:16 PM
Avinesh
Avinesh - avatar
+ 3
Works fine. The main method should be inside the class. https://code.sololearn.com/cw8GIOMG002D/?ref=app
29th Aug 2021, 3:45 PM
Avinesh
Avinesh - avatar
0
It would be better if I attached the screen
29th Aug 2021, 5:44 PM
Katerina UA
Katerina UA - avatar
0
But I can not ((( It is the exercise in C# training I need to write a Clasa Project and a Constructor in it That will be write a string after its crearion But my code do not work
29th Aug 2021, 5:46 PM
Katerina UA
Katerina UA - avatar
0
And the only one test os locked
29th Aug 2021, 5:49 PM
Katerina UA
Katerina UA - avatar
0
Aninesh your code has not been working
29th Aug 2021, 5:50 PM
Katerina UA
Katerina UA - avatar
0
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { Project project = new Project(); } } class Project { public Project(){ Console.Write("Project created"); } } } This test is passed
19th Mar 2024, 4:43 PM
Mahima Rathore
Mahima Rathore - avatar