T
Tem
I have 3 static methods that share almost the same code with only a few
lines where different operators are used.
Is there a way to pass in an operator as a parameter?
pseudo code
Greater() {Base(>)}
Less() {Base(<)}
Equal() {Base(==)}
Base(operator op)
{
....
if(a op b)
....
}
Or another way of doing this?
Tem
lines where different operators are used.
Is there a way to pass in an operator as a parameter?
pseudo code
Greater() {Base(>)}
Less() {Base(<)}
Equal() {Base(==)}
Base(operator op)
{
....
if(a op b)
....
}
Or another way of doing this?
Tem