The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

To null or not to null? by Khaar2009-01-29 02:19:43
  I'd think about buildign an object around it.. by Enzomatrix2009-01-29 02:27:27
    Sounds good to me... by mekkanik_mike2009-01-29 03:20:08
      For example, but you forgot the constructor.. by Enzomatrix 2009-01-29 04:27:32
class Value 
{
  private int val;
  private bool isValid = false;

  public  Value(int v) 
  { 
    isValid = true; 
    val = v; 
  }
  public Value() {
    // Called for nonvalid value. Basically empty... But lets be proper:
    isValid = false;
  }

  public bool IsSet() 
  { 
    return set; 
  }
}
[ Reply ]
        That's C#'s Nullable<T> class, right there. (n/t) by bwkaz2009-01-29 08:58:58

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)