0

What is the Error on this code? Output is correct. And as same as all test case outputs also.

What is the Error on this code? Output is correct. And as same as all test case outputs also. But same time all the test cases are not passed. namespace Code_Coach_Challenge { class Program { static void Main(string[] args) { string postText = Console.ReadLine(); Post post = new Post(); post.Text = postText; post.ShowPost(); } } class Post { private string text; public Post(){ Console.WriteLine("New Post"); } //write a constructor here public void ShowPost() { Console.Write(Text); } public string Text{ get{ return text; } set{ text = value; } } //write a property for member text } }

30th Aug 2021, 2:16 PM
Siva Prakasam
Siva Prakasam - avatar
3 Answers
+ 3
Are you sure the constructor was supposed to print "New Post" and not "New post"?
30th Aug 2021, 2:51 PM
Ipang
+ 1
Yeah the projects are case sensitive so you habe to type exactly what it says
31st Aug 2021, 8:28 PM
ITDW
0
Where is return value?
31st Aug 2021, 9:19 PM
GDSHNIK
GDSHNIK - avatar