Top "Tostring" questions

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

StringBuilder.ToString() throws OutOfMemoryException

I have a created a StringBuilder of length "132370292", when I try to get the string using the ToString() method it …

c# .net-2.0 tostring stringbuilder streamwriter
How do I convert a StringReader to a String?

I'm trying to convert my StringReader back to a regular String, as shown: String string = reader.toString(); But when I …

java string tostring stringreader
What is the difference between toString and mkString in scala?

I have a file that contains 10 lines - I want to retrieve it, and then split them with a newline("\…

java string scala tostring
Where and why do we use __toString() in PHP?

I understand how it works but why would we practically use this? <?php class cat { public function __toString() { return "…

php oop tostring
How to create an extension method for ToString?

I have tried this: public static class ListHelper { public static string ToString<T>(this IList<String> …

c# .net tostring
Does String's toString() method have any practical purpose?

I was reading the docs and noticed it. Never imaginated it. The description: This object (which is already a string!) …

java string tostring
Overriding ToString() of List<MyClass>

I have a class MyClass, and I would like to override the method ToString() of instances of List: class MyClass { …

c# string extension-methods overriding tostring
Entity Framework 4 / Linq: How to convert from DateTime to string in a query?

I have the following query: from a in Products select new ProductVM { id = a.id, modified = a.modified.ToString() } Which …

entity-framework-4 linq-to-entities tostring
C# Converting 20 digit precision double to string and back again

In C#. I have a double (which I've extracted from a database) that has 20 digit precision. In Visual Studio (using …

c# double precision tostring
datetime.tostring month and day language

i have a list of email addresses of people that have different nationalities (for each person i have the iso …

c# datetime tostring cultureinfo