int index = 0;
if (val[0] == '-') { this.positive = false; index++; }
else this.positive = true; for (; index < val.Length && val[index] == '0'; index++)
; for (; index < val.Length; index++)
if (val[index] > '9' || val[index] < '0')
throw new ArithmeticException("uncorrect digital string");
else
data.Insert(0, val[index] - '0');
if (val[0] == '-') { this.positive = false; index++; }
else this.positive = true; for (; index < val.Length && val[index] == '0'; index++)
; for (; index < val.Length; index++)
if (val[index] > '9' || val[index] < '0')
throw new ArithmeticException("uncorrect digital string");
else
data.Insert(0, val[index] - '0');
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货