Answer the question
In order to leave comments, you need to log in
When translating a float into a string, the number is obtained with a comma, not a dot. Is it possible to convert float to string so that the number is with a dot?
I work with SQL in C#.
When trying to insert a row with float values from C#, the error "Data trunsducted for row x1" is thrown.
As I understand it, this error only comes out because my C# program sends a request with the number 32523.425 instead of the number 32523.425 , because C# puts a comma instead of a period.
The question is, is it possible to somehow convert a float to a string so that the number is with a dot, and not with a comma?
Answer the question
In order to leave comments, you need to log in
The comma is written due to the fact that you have Russian culture.
You can pass the necessary culture in ToString.
For example:
(42.5).ToString(System.Globalization.CultureInfo.InvariantCulture)
When trying to insert a string with float types from C#, an error occurs
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question