How to check conditions without using if else or switch

Trips

Well-known member
Joined
Aug 7, 2010
Messages
2,788
Hi,
I have a method in c# that accepts one parameter and have two values in it lets say x=10, y=20 if I pass 10 to the method hten it will show output as 20 and viceversa. The above method is required not to use if-else or any condition checking statements
so how can I achieve the task.

Please help me out
Regards ,
Zafar

View the full article
 
Back
Top