toString Summary Converts the short value to an equivalent string value. Signatures Click on a signature to select it and view its documentation. public string toString() public string toString(int base) Usage public string toString() public string toString(int base) Returns The equivalent string value for the short value. A string representation of the integer value. Parameters base The base to convert the integer value to. Must be between 2-36. Description Converts the short value to an equivalent string value. For instance, 123 will become "123". Returns a string representation of the integer by converting the integer value from base 10 to the specified base. System.Exceptions.OutOfRangeException will be thrown if the supplied argument for the base is not an integer between 2 and 36 (inclusive). Examples Basic Usage 123456import System; short a = 1;short b = 2;Console.log(a.toString()); // "1"Console.log(b.toString()); // "2" Concatentation of Stringified Values 123456import System; short a = 1;short b = 2;Console.log(a.toString() + b.toString()); // "12"Console.log(a.toString() + ", " + b.toString()); // "1, 2" Basic Usage 123short a = 97;string base8 = a.toString(8); // "141"string base16 = a.toString(16); // "61" Converting integer to string 12short a = 97;string s = a.toString(10); // "97" Share HTML | BBCode | Direct Link