Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. Clever Code
  4. This one again - when comparison attacks!

This one again - when comparison attacks!

Scheduled Pinned Locked Moved Clever Code
csharpworkspace
2 Posts 2 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Shog9 0
    wrote on last edited by
    #1

    Setup: This is part of a routine to retrieve a string representation of a value via reflection, with certain conditions as to which types and values are allowable. objValue will usually be a boxed value type - for instance, a Double value such as 0.0 ... which should result in something like "0" being returned. Really simple stuff... so long as you aren't writing VB while thinking C#.

    If (Nothing = objValue) Then Return ""

    :doh:

    ----

    ...the wind blows over it and it is gone, and its place remembers it no more...

    P 1 Reply Last reply
    0
    • S Shog9 0

      Setup: This is part of a routine to retrieve a string representation of a value via reflection, with certain conditions as to which types and values are allowable. objValue will usually be a boxed value type - for instance, a Double value such as 0.0 ... which should result in something like "0" being returned. Really simple stuff... so long as you aren't writing VB while thinking C#.

      If (Nothing = objValue) Then Return ""

      :doh:

      ----

      ...the wind blows over it and it is gone, and its place remembers it no more...

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      Shog9 wrote:

      writing VB while thinking C#.

      There you have it in a nutshell; VB. You know that the thinking one is C#, yet you insist on doing this VB stuff. Go and stand in the corner for 10 minutes (act ashamed while you're there).

      Deja View - the feeling that you've seen this post before.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups