public void toStringTest2() { long a; String b; a = (long)10000000000L; b = Long.toString(a); Assert.AreEqual("10000000000", b); a = (long)0; b = Long.toString(a); Assert.AreEqual("0", b); a = (long)-10000000000L; b = Long.toString(a); Assert.AreEqual("-10000000000", b); }
public void toStringTest() { Long a; String b; a = new Long((long)10000000000L); b = a.toString(); Assert.AreEqual("10000000000", b); a = new Long((long)0); b = a.toString(); Assert.AreEqual("0", b); a = new Long((long)-10000000000L); b = a.toString(); Assert.AreEqual("-10000000000", b); }
/// <summary> /// Returns a String object representing this Long's value. /// </summary> /// <returns>a string representation of the value of this object in base 10. /// </returns> public override String toString() { return(Long.toString(v)); }