Last post Aug 26, 2014 01:14 AM by Summer - MSFT
Aug 25, 2014 07:05 AM|shilpa.gururao|LINK
Quite challenging requirement I have. .
I have a class with stores LeftHandSideVaue, operator and result.
Operator can be like =, !=, >, < etc. Now is it possible to use it like variable1 operator variable2. Kindly let me know
Aug 25, 2014 07:51 AM|MetalAsp.Net|LINK
You'll need to use an if block or a switch block to determine what operator is being used; something like:
// do your processing for greater than
// do your processing for less than
Aug 25, 2014 07:59 AM|shilpa.gururao|LINK
Thanks for reply.
Exactly this I did... expecting any other better solution if there.....
Aug 25, 2014 08:50 AM|Ashim Chatterjee|LINK
case is the best and efficient option here as per my understanding.
Aug 26, 2014 01:14 AM|Summer - MSFT|LINK
According to your description, you could try overriding the operator.
Please refer to link about how to override operator.
If you have any other questions, please feel free to post this forum.