7
Reply

How can we convert.Intofloat like convert.intoint32

Muhammed Athil MP

Muhammed Athil MP

Mar 01, 2012
4.8k
0

    If you use Convert.Tosingle , it is an unnecessay Typecast.
    So always use the float.TryParse()

    Lajapathy Arun
    April 08, 2012
    0

    convert.ToSingle()

    The equivalent of Convert.ToInt32 for float values is Convert.ToSingle.


    'float' in C# is an alias for the System.Single structure which is where 'Single' comes from in this context.

    Vulpes
    March 18, 2012
    0

    Web browser: A software application for retrieving, presenting and traversing information resources on the World Wide Web. 
    example: Internet Explorer, Mozilla Firefox, Google Chrome 

    Web server: a program on a server computer, somewhere out on the internet, that delivers web pages to web browser.

    piyush sardhara
    March 13, 2012
    0

    IN C# .NET


    Convert.ToDouble()
    Use for Float Value

    piyush sardhara
    March 13, 2012
    0

    Hi Folks,


    Use int.TryParse() as same we have 
    for float, decimal

    This is safe and it helps to set default value if conversion fails.

    Thanks
    Guys

    Lajapathy Arun
    March 09, 2012
    0

    in c#

    float.Parse()
    

    Gohil Jayendrasinh
    March 09, 2012
    0