Top "Tostring" questions

"toString" or "ToString" is a major formatting method or function used in high level programming languages.

Swift equivalent of Java toString()

What is the Swift equivalent of Java toString() to print the state of a class instance?

ios swift string tostring customstringconvertible
What are the shortcut to Auto-generating toString Method in Eclipse?

Is it good or bad practice auto-generating toString methods for some simple classes? I was thinking of generating something like …

java automation tostring
Why does String(null) work?

null and undefined don't have a toString or valueOf method. Afaik using String calls the toString method of its parameter (…

javascript string null tostring
Why does the toString method in java not seem to work for an array

I want to convert a character array to a string object using the toString() method in java. Here is a …

java tostring arrays
.NET: How to convert Exception to string?

When an exception is thrown (while debugging in the IDE), i have the opportunity to view details of the exception: …

c# .net exception tostring
Difference between .ToString and "as string" in C#

What is the difference between using the two following statements? It appears to me that the first "as string" is …

c# string tostring
'No overload for method 'ToString' takes '1' arguments' error occur While Formatting Datetime Field To String ON "dd-MM-yyyy" format

I have been working on asp.net 3.5.I want to Convert a DateTime Data from sqldatareader to a String on "…

asp.net datetime tostring
Java toString() using reflection?

I was writing a toString() for a class in Java the other day by manually writing out each element of …

java performance reflection tostring
Get Command Prompt Output to String In Java

I need a java method that will read command prompt output and store it into a String to be read …

java tostring command-prompt outputstream
How to display DateTime with an abbreviated Time Zone?

I am aware of the System.TimeZone class as well as the many uses of the DateTime.ToString() method. What …

.net datetime formatting timezone tostring