how to handle culture in double parsing in c#?
问题 I have a question about how to handle culture while parsing doubles. In a system price information from various servers comes together. However the data thats given as input varies in culture. two million and fifty cents is given as : "2.000.000,50" "2,000,000.50" "2000000.50" "2000000,50" is there a generic way to handle these various types of input ? 回答1: No, there is no generic way. You either need to know what culture the double was formatted or all the servers need to send in a single