c# - Split Double Value from textbox into multiple array -


Can anyone show me how I can divide the value of the double like this: - Do I have it = =

  int i [0] = 65 INT I [1] = 4 INT I [ 2] = 7 int i [3] = 8 double I [4] = 2.690   

For the answer, appreciate it. Thank you in advance.

Edit ***

I have UTM coordination value in my XML. I want to make chart and value for coordination is to fall into the grid. Say that I have X1 Area (578462.254), y1 (648523.124) & amp; X2 (578481.452), y2 (648474.156) in my XML, I have a datapoint that falls under this coordination. What I want to do is make the chart grid the zone area min and max (x, y) with the first two digits.

I hope that my explanation can be understood as to what I want to do with those data. Thanks a lot.

I got the answer: -

  decimal decimal = 654782.690; String sValue = dValue.ToString (); Decimal [] dere = new decimals [5]; DARR [0] = Convert toDecimal (sValue.Substring (0, 2)); DARRE [1] = convert toDecimal (sValue.Substring (2, 1)); DARRE [2] = Convert. ToDecimal (sValue.Substring (3, 1)); DARRE [3] = convert toDecimal (sValue.Substring (4, 1)); Dere [4] = convert toDecimal (sValue.Substring (5));   

Its work now !!! Thank you for your support in solving my problem. :) Use decimal instead of double

< P> If you are not accumulating scientific value.
  decimal dValue = 654782.690m; String sValue = dValue.ToString (); Descium [] DARRE = new decimals [5]; DARR [0] = convert toDecimal (sValue.Substring (0,2)); DARRE [1] = convert toDecimal (sValue.Substring (2,1)); DARRE [2] = convert toDecimal (sValue.Substring (3,1)); DARRA [3] = convert toDecimal (sValue.Substring (4,1)); Dere [4] = convert toDecimal (sValue.Substring (5));   

Use Convert.ToInt32 () to enter the Internet type to use the value of the array index of 0 to 3.

  int iValue = convert. ToInt32 (DERRE [0]);   

The above example is not compiled, this error can be given as an example of this argument.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -