«« Next » « Previous
«« Next » « Previous

Link Details

Link 86389 thumbnail
User 285573 avatar

By alashcraft
via blog.philknows.net
Published: Jun 10 2008 / 11:57

Me either. See here in the C# Language Reference. This means you can overload the operators for your classes. The example on MSDN talks about classes that have a true, false, or null (neither true nor false) state. You could also create a type that can be both true and false.
  • 13
  • 2
  • 938
  • 324

Comments

Add your comment
User 235017 avatar

ugur.myopenid.com replied ago:

0 votes Vote down Vote up Reply

wowww that was cool=))))))))

User 168140 avatar

adiand replied ago:

1 votes Vote down Vote up Reply

Cool!?! Can someone explain how this is related to reality... under what circumstances would sensible code define true != !(false) or true == null?

Try replacing "CustomerIsGoodRule cigr = new CustomerIsGoodRule(c);" to "Rule rule = getNextRule();" and read the code again... does it still make sense?

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.