19-07-2009, 10:21 PM
Beres Wrote:My question is, what is different about the Convert.ToString() compared to the blah.blah.ToString?Convert.ToString() is a bunch of functions from the .Net Framework.
.ToString() is a class member function. The thing is that every type in C# already has the implementation of the ToString function, even your custom classes(the default shows the object name, if I remember correctly). The good thing about this is that you can make your own ToString() functions for your custom classes, using the override reserved word.
Code:
public override string ToString()
{
return "anything";
}