Pascal is my study language and I am curious whether C# also has the functions pred and succ.
This is what I have done in Pascal that I want to try in C#
// in Pascal:
pred(3) = 2
succ(False) = True
pred('b') = 'a'
type enum = (foo, bar, baz);
succ(bar) = baz; pred(bar) = foo
Is the same code applicable for C#, too? If so, what is the namespace for these functions?
(I searched Google, but couldn’t find the answer)
There aren’t
predandsuccfunctions in C#. You just writen - 1orn + 1.