Dart Programming - toString Method



This method returns the string representation of the number's value.

Syntax

Number.toString()

Return Value

Returns a string representing the specified Number object.

Example

void main() {   
   int n1 = 2;   
   var value = n1.toString();   
   print( value is String ); 
}  

It will produce the following output −.

true
dart_programming_numbers.htm
Advertisements