#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    1
    Rep Power
    0

    Number string to arrays


    Hello, I am a bit of a newbie with C#. I'm trying to convert a number string/int to X arrays by splitting it by Y. Let me visualize:
    c# Code:
    string bla="45263263";
    arrays=bla.toarray(bla.splitby(2))
    //this would output:
    array1=[4,5];
    array2=[2,6];
    array3=[3,2];
    array4=[6,3];

    I would be grateful if you would like to help me! Thanks in advance!
  2. #2
  3. Java Junkie
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jan 2004
    Location
    Mobile, Alabama
    Posts
    4,021
    Rep Power
    1285
    You can use the substr function.

IMN logo majestic logo threadwatch logo seochat tools logo