-1

I've search around a lot & keep getting a mixture of errors, I'm using a web api to convert some text to numbers (xuid) I then want to convert those numbers to a hexadecimal & keep getting an error saying the value was too large||small for an int32 code--

        WebClient client = new WebClient();
        client.Headers.Add("Content-Type", "text/json");
        client.Headers.Add("X-AUTH", "ce0c28c65911893794ec47af634939b9445d2007");
        await Task.Delay(500);

        var fd = client.DownloadString("https://xboxapi.com/v2/xuid/" + Gamertag.Text);
        int decVal = int.Parse(fd, System.Globalization.NumberStyles.HexNumber);
        Xuid.Text = decVal.ToString();
Tom
  • 11
  • 4

1 Answers1

0

An int variable holds a number, not a representation of the number. So use

 Xuid.Text = decVal.ToString("X");

For the required output

sujith karivelil
  • 28,671
  • 6
  • 55
  • 88