I have a function:
static int Example(int a, int b) { if (a>b) return 1; else if (a<b) return 2; else if (....) return 3; ... } In which something is checked with the help of ifs and then the value from these ifs is taken and returned.
But an int function should always return a value, that is, after passing, I have to write another return , but if I write it, the value will be returned only from this return. How can I return values from ifs only?
но если я его напишу возвращаться будет значение только из этого return'аbut something you are not doing. Then bring all the code ... - pavelcin your code? - VladD