2

Closed

Substring issue in 4.2 RC4

description

I think I found an issue. Not sure this has been reported. The following code worked in 4.1, but in 4.2 it fails:
 
[code]
double Temperature = 79.78374927437;
 
string formattedTemp = Temperature.ToString().Substring(0,5) + "F";
 
Debug.Write(formattedTemp);
[/code]
For some reason it seems to think Temperature.ToString() is null however, reworking the code this way works:
 
[code]
double Temperature = 79.78374927437;
 
string formattedTemp = Temperature.ToString();
 
Debug.Write(formattedTemp.Substring(0,5) + "F");
[/code]
Closed Jul 23, 2012 at 10:39 PM by ZachLibby
Fixed in code change set 23510.

comments