What's the equivalent for Pred and Succ in C#?

There aren't pred and succ functions in C#. You just write n - 1 or n + 1.

Ouch. :(. Thanks for the information.

I give a tick for you for a fast and good one . – Marie Curie Dec 19 '10 at 8:07.

You can use ++ or -- operator: 3++ = 4 3-- = 2 Not sure why you would need it though when you can just do 3+1 or 3-1 :).

It is good to know that I can use operators for that. I just have a little doubt to clarify with you. Is a++ = be and c-- = b?

– Marie Curie Dec 19 '10 at 8:11 You can't write 3++. But you can write a = 3; a++;. – dan04 Dec 19 '10 at 19:40.

You have method overloading in c# so it's easy to have pred and succ, You can do it by: public int pred(int input) { return input - 1; } public char pred(char input) { return (char)((int)input - 1); } ....

Thanks for writing me a simple procedure for me to put in real time use. :D – Marie Curie Dec 19 '10 at 8:13 @Marie Curie, I wroted this to clarify difference between char and int because it's not as simple as int – Saeed Amiri Dec 19 '10 at 8:36 so you are trying to clarify me that you are trying the type conversion of char to ascii value or some similar operation of changing the char value to a interger and then decrement it by 1. I got the word decrement to mean -- operator.Is the word correct?

;) – Marie Curie Dec 19 '10 at 13:02.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions