Code: Select all
const x="12";
int y=x.ToInt();
console.printf("%d",y);Code: Select all
int y="12".ToInt();
console.printf("%d",y);But...
Code: Select all
String x="12";
int y=x.ToInt();
console.printf("%d",y);I don't think this is intended, and while running ToInt() on a literal is pointless, some may want to run it on a constant.
EDIT: Also happens with ToDouble()
