Skip to content

[CSharp] Issue with double numbers if local is not US #6785

Open
@lunat

Description

@lunat

Hi,

I am using codegen 2.3.0.

In file ApiClient, the Method
public string ParameterToString(object obj)
contains an error at row:

If I use a localization different from "US" and I have a double value this row returns a number with a comma "," instead dot "."

I think it should be better to return always the "dotted" number adding another "else if" condition:

    else if (obj is double || obj is decimal)
    {
        return Convert.ToString(obj, new CultureInfo("en-US"));
    }

Thanks,

lunat

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions