close

C# 中並無IsNumeric函式(IsNumeric visual Basic特有)查了一下方法可利用 TryParse 來判別

image

同時試了一下 Double.TryParse float.TryParse 

INBOUND 123123123 123123.123 123,123.123 1,23,1,23.123
int.TryParse T F F F
float.TryParse T T T T
Double.TryParse T T T T

 發現float.TryParse Double.TryParse 對於千分位符號並不會特別檢查

因本次要檢查的欄位為金額(整數)故已int.TryParse 來判斷

arrow
arrow
    文章標籤
    C#
    全站熱搜

    JosephChou 發表在 痞客邦 留言(0) 人氣()