+ 1

What is the reason for the error here?

I am getting "Identifier expected" error. Issue not resolved even though I value classes https://code.sololearn.com/c9SzrsFs7NIv/?ref=app

24th Sep 2022, 11:03 AM
Fırat Özel
Fırat Özel - avatar
3 Respostas
+ 2
int x,y,add,multiply,subtract,divide; // this simple statement should not be inside namespace. Add in class public static class Calculator { public static Add(x,y) // return type is missing... Either use void and dont return anything. Or use int return type.. And it is method definition, sholud include types for x, y { ... Correct way for single Add method : public static class Calculator { static int add,multiply,subtract,divide; public static void Add(int x,int y) { add = x + y; Console.WriteLine("Toplama Islemi= "+add); } } You can modify same way other methods... Hope it helps...
24th Sep 2022, 11:23 AM
Jayakrishna 🇼🇳
+ 3
Jayakrishna🇼🇳 I did what you said and it worked. Thank you very much for helping me find the errorđŸ™đŸ» Indians are really experts in the field of softwaređŸ˜€đŸ‘đŸ»
24th Sep 2022, 11:41 AM
Fırat Özel
Fırat Özel - avatar
+ 2
🙏&👍 You're welcome..
24th Sep 2022, 1:06 PM
Jayakrishna 🇼🇳