Good day!

In books / manuals about C # did not find how to denote separators. For example, in C ++, the decimal separator was a separator for fractional numbers, and for separating time components, it seems like TimeSeparator is used. I am looking for something like this for Sharpe.


З.Ы .: Codes of symbols and their representations in brackets do not channel, because then the program will be dependent on the configurations of the PC.

  • What are the separators? What separators? - Vladimir Gordeev 4:26 pm

1 answer 1

To manipulate different date and time formats, use properties from the System.Globalization space:

 DateTimeFormatInfo.TimeSeparator DateTimeFormatInfo.DateSeparator 

You cannot assign the same value to both fields. And with numbers:

 NumberFormatInfo.NumberDecimalSeparator NumberFormatInfo.NumberGroupSeparator 

It is also impossible to assign the same values ​​to these two fields.

  • Thank you very much! Only for "NumberFormatInfo.NumberDecimalSeparator" for some reason swears, "NumberFormatInfo.InvariantInfo.NumberDecimalSeparator" plows. - uzumaxy