Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Parsing in .NET

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 95
    Comment on it

    Parsing values in .NET

    While converting or parsing values we need to provide the variable to convert and datatype to be converted into String

    We will see here the difference between

    1 Convert.ToString()

    2 .ToString()

    While handling null values it is suggested to use always Convert.ToString() method

    For ex: Convert.ToString(name)
    

    If your variable is going to have null or an empty value than .ToString() method will generate an exception

    For ex :name.ToString()

    So it is better to use the first method always instead on the second one in to avoid the exception

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: