Announcement

Collapse
No announcement yet.

double.TryParse signature incorrect

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    double.TryParse signature incorrect

    These are the signatures which are supported by .NET:
    public static bool TryParse(string s, out Double result);
    public static bool TryParse(string s, NumberStyles style, IFormatProvider provider, out Double result);
    .. and those signatures are supported by Bridge.NET. Note, that the 2nd signature is wrong:
    public static bool TryParse(string s, out Double result);
    public static bool TryParse(string s, IFormatProvider provider, out Double result);

    #2
    Hi,

    Bridge doesn't support NumberStyles enum, therefore, signature was changed
    Last edited by geoffrey.mcgill; 2017-03-27 @ 04:21 AM.

    Comment


      #3
      The second signature should not have been added. We have two options:
      1. Remove the overload with NumberStyles, or
      2. Implement NumberStyles

      Right now we're very short on resources for anyone on the team to implement NumberStyles, so we'll likely just have to remove the overload for now.

      Comment


        #4
        Hmm .. please leave it in then. Reason: a lot of data exchange between (web) client and server is done based on .InvariantCulture, which explicitly needed to be set when (de-) serializing (numeric) values since the (web) client is not running on .InvariantCulture.

        Comment

        Working...
        X