Part 59 C# Tutorial Difference between Convert ToString and ToString

Part 59 C# Tutorial Difference between Convert ToString and ToString

C#, SQL Server, WCF, MVC and ASP .NET video tutorials for beginners http://www.youtube.com/user/kudvenkat/playlists Complete 60 part c# series: www.youtube.c…
Video Tutorial Rating: 4 / 5

Don’t forget to check out our other video tutorials or share this video with a friend.

1 Star2 Stars3 Stars4 Stars5 Stars 0 votes
Loading... 1,902 views





2 responses to “Part 59 C# Tutorial Difference between Convert ToString and ToString”

  1. rvnl0rd says:

    It is curious, because I tried this:
    Console.WriteLine(“Convert.ToString(C1) = {0}”, (str == null || str == “”)
    ? “Null” : str);
    this: str == null returns false
    while this: str == “” returns true.
    I have a lot to learn i guess, cuz i thought that even while
    convert.tostring handled null properly i thought that these two str == null
    and str == “” should both return true, debugging shows otherwise.

  2. vangli rajan says:

    great tip venkat, we usually check null and then convert. i didnt know
    this.super

Leave a Reply

Your email address will not be published. Required fields are marked *