+ 1

C# Login method code

Please check my last code it doesn't work ;

5th Feb 2020, 10:43 PM
Yasser Bebo
Yasser Bebo - avatar
4 Answers
+ 5
You had some syntax errors: check: https://code.sololearn.com/cWILU26MLIE5/#cs
5th Feb 2020, 11:28 PM
Black Winter
+ 2
You have many syntax errors in your code Console.WriteLine - - make sure you don't make spelling mistakes and use correct capitalization In your if/else condition, make sure to put the braces where they need to be. It helps to see the structure if you indent the code more nicely. if (string.IsNullOrEmpty(username) || string.IsNullOrEmpty(password) ) { return "Usernamr or Password can't be empty."; } else if (username == "amr" && password == "123") { return " Welcome Amr."; } else { return "Sorry try again."; }
5th Feb 2020, 11:26 PM
Tibor Santa
Tibor Santa - avatar
+ 1
Thank you very much ⛄☔💙
6th Feb 2020, 8:37 AM
Yasser Bebo
Yasser Bebo - avatar
0
I made changes to it, bust there's another error !
6th Feb 2020, 9:07 AM
Yasser Bebo
Yasser Bebo - avatar