943,817 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Marked Solved
  • Views: 4752
  • VB.NET RSS
Oct 19th, 2008
0

Public Overrides Function ToString()

Expand Post »
Hey,
Can someone explain to me how this function works in relation to a GUI output.

Public Overrides Function ToString() As String

My program do some calculation and conversions and displays the resluts in a list box. I need use this function but i am not sure how it affects my output.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
3Dees is offline Offline
23 posts
since Sep 2008
Oct 19th, 2008
0

Re: Public Overrides Function ToString()

ToString() gives the textual respresentation of the object. This means with numbers that, for example, number 3 gets displayd as string "3".
ToString() also accepts format string as a parameter and this gives the full power of it. For example -123.ToString("X") returns hexadecimal representation of the number (=FFFFFF85).
You can read more about string formsts from the MSDN documentation.
Since it's overridable method you can have your own implementation of it in your own class.
Reputation Points: 218
Solved Threads: 201
Veteran Poster
Teme64 is offline Offline
1,024 posts
since Aug 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: How do you access pictureboxes as arrays
Next Thread in VB.NET Forum Timeline: How to get my User Control into the Toolbox?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC