예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
 /// <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));
 }