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. General Programming
  3. C#
  4. write a function to check if the value is in float format?

write a function to check if the value is in float format?

Scheduled Pinned Locked Moved C#
question
4 Posts 4 Posters 0 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.
  • C Offline
    C Offline
    cyn8
    wrote on last edited by
    #1

    hi, how can i write a function to check if the value is in float format? it should return true is the value is in float format. thanks

    K M C 3 Replies Last reply
    0
    • C cyn8

      hi, how can i write a function to check if the value is in float format? it should return true is the value is in float format. thanks

      K Offline
      K Offline
      Kerem Guemruekcue
      wrote on last edited by
      #2

      Hi, see here: http://www.thescripts.com/forum/thread230544.html[^] Maybe there is something that you can use. If the build-in functions given in the .NET do not saticfy you applications need then you can try the examples given in the link above,... Regards Kerem

      ----------------------- Beste Grüsse / Best regards / Votre bien devoue Kerem Gümrükcü Microsoft Live Space: http://kerem-g.spaces.live.com/ Latest Open-Source Projects: http://entwicklung.junetz.de ----------------------- "This reply is provided as is, without warranty express or implied."

      1 Reply Last reply
      0
      • C cyn8

        hi, how can i write a function to check if the value is in float format? it should return true is the value is in float format. thanks

        M Offline
        M Offline
        Mr Candyman
        wrote on last edited by
        #3

        return (value as float?) != null;

        1 Reply Last reply
        0
        • C cyn8

          hi, how can i write a function to check if the value is in float format? it should return true is the value is in float format. thanks

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          float.TryParse

          Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

          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