Hi,
I am very new to C# (started today!). There seems to be two ways to convert an integer variable (in this case x) to a string:
i.e.
MyString = Convert.ToString(x)
MyString = x.ToString()
Can anyone tell me if there is any reason for using one or other method, or are they essentially the same?
Thanks.
There are two ways to write error-free programs; only the third one works.
I am very new to C# (started today!). There seems to be two ways to convert an integer variable (in this case x) to a string:
i.e.
MyString = Convert.ToString(x)
MyString = x.ToString()
Can anyone tell me if there is any reason for using one or other method, or are they essentially the same?
Thanks.
There are two ways to write error-free programs; only the third one works.