in

DevPinoy.org

A Filipino Developers Community
All Tags » C# » C (RSS)
ATTENTION:Take our Code Challenge for the month of October 2008 and win some great prize! Learn more about it here!

Browse Site by Tags

Showing related tags and posts accross the entire site.
  • The (-) operator

    I used to multiply a numeric number to -1 just to get its additive inverse (negative value for positive numbers) and I found out that the (-) operator does it implicitly. int value = 10 int negativeValue = value * -1 int negativeValueAlso = -value
    Posted to jokiz (Weblog) by jokiz on 04-28-2005
  • Efficient For Loop

    [code language="C#"] for (int i = 0; i < collection.Count; i++) { //do something with collection } [/code] I’ve done this before and for me, the efficient way is to store the Count property of the collection rather than access it everytime for the for loop check, lots of indirection involved (I hope...
    Posted to jokiz (Weblog) by jokiz on 03-17-2005
  • Assignment in a WHILE condition

    Before, I used to think that in C, the assignment operator always evaluate to true. It is because of this context: [code language="C#"] while (intLeft == intRight) { //do whatever } [/code] If you mistyped the comparison operator (==) as a single equal sign (=) for assignment (of course it will compile...
    Posted to jokiz (Weblog) by jokiz on 01-17-2005
Page 1 of 1 (3 items)

Copyright DevPinoy 2005-2008
Powered by Community Server (Commercial Edition), by Telligent Systems