About 12,100,000 results
Open links in new tab
  1. How to use the toString method in Java? - Stack Overflow

    Sep 1, 2010 · Can anybody explain to me the concept of the toString() method, defined in the Object class? How is it used, and what is its purpose?

  2. Java - Convert integer to string - Stack Overflow

    int i = 1234; String str = Integer.toString(i); Returns a String object representing the specified integer. The argument is converted to signed decimal representation and returned as a string, …

  3. Difference between Convert.ToString () and .ToString () - Stack …

    May 13, 2010 · What is the difference between Convert.ToString() and .ToString()? I found many differences online, but what's the major difference?

  4. Difference between .ToString and "as string" in C#

    May 24, 2017 · ToString(), simply calls the object's ToString() method, either a custom one implemented by the class (which for most in-built types performs a conversion to string) - or if …

  5. What's the difference between String(value) vs value.toString()

    Oct 15, 2010 · String(value) should have the same result as value.toString() in every case, except for values without properties like null or undefined. ''+value will produce the same result.

  6. c# - Why does 0.ToString ("#.##") return an empty string instead …

    Jan 25, 2012 · 0.ToString("0.00"); See here for the custom numeric formats that can be passed to this method.

  7. How can I format a number into a string with leading zeros?

    I have a number that I need to convert to a string. First I used this: Key = i.ToString(); But I realize it's being sorted in a strange order and so I need to pad it with zeros. How could I do this?

  8. Why does the string type have a .ToString () method?

    May 6, 2010 · The type System.String, like almost all types in .NET, derives from System.Object. Object has a ToString() method and so String inherits this method. It is a virtual method and …

  9. How do I display a decimal value to 2 decimal places?

    When displaying the value of a decimal currently with .ToString(), it's accurate to like 15 decimal places, and since I'm using it to represent dollars and cents, I only want the output to be 2 dec...

  10. What's the difference between ToString ("D2") .ToString ("00")

    Oct 24, 2012 · .ToString("00") Both are being used to convert numbers from 0 to 99 into strings from 00 to 99. That is strings where the numbers 0-9 have a leading zero. Do both of these …