+ 2

C# | Property not working in Social Media Prototype

Hello I'm currently trying to solve the lesson 41 in the C# course of the app (making a Social Network Prototype using Constructors and Properties) but when I try running my code I get the compiler errors CS542 and CS0547. Any idea on how to fix it and what I did wrong? Thanks! https://code.sololearn.com/cjJuS9J0Pe3i/?ref=app

21st Mar 2022, 4:48 PM
Cloud
Cloud - avatar
2 ответов
+ 2
Remove void from constructor. Print 'text' instead of 'postText' from ShowText() ; Return type of property text must be string. Not void.
21st Mar 2022, 5:08 PM
Jayakrishna 🇮🇳
+ 3
Thanks Jayakrishna🇮🇳 . That was really helpful
28th Sep 2022, 3:58 AM
Mr Ajiero
Mr Ajiero - avatar