- if (s.Substring (pos, nfi.NegativeSign.Length) == nfi.NegativeSign)
- if (tryParse)
- return false;
- else
- throw new FormatException ("Input string was not in the correct " +
- "format: Has Negative Sign.");
- if (s.Substring (pos, nfi.PositiveSign.Length) == nfi.PositiveSign)
- if (tryParse)
- return false;
- else
- throw new FormatException ("Input string was not in the correct " +
- "format: Has Positive Sign.");
+ if (s.Substring (pos, nfi.NegativeSign.Length) == nfi.NegativeSign) {
+ if (!tryParse)
+ exc = new FormatException ("Input string was not in the correct " +
+ "format: Has Negative Sign.");
+ return false;
+ }
+ if (s.Substring (pos, nfi.PositiveSign.Length) == nfi.PositiveSign) {
+ if (!tryParse)
+ exc = new FormatException ("Input string was not in the correct " +
+ "format: Has Positive Sign.");
+ return false;
+ }