Int as array representation
<p>I need an int array, from an int value.</p>

<blockquote>
  <p>The int value 123456 converts to int[] {1,2,3,4,5,6}.</p>
</blockquote>

<p>Is there any better solution than this:</p>

<pre><code>using System.Diagnostics;

namespace test
{
#if DEBUG
    [DebuggerDisplay("{GetDebuggerDisplay()}")]
#endif
    public class IntArray
    {

#if DEBUG
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
#endif
        private int _value;
#if DEBUG
        [DebuggerBrowsableAttribute(DebuggerBrowsableState.Never)] 
#endif
        private int[] _valueArray;

        public IntArray(int intValue)
        {
            Value = intValue;
        }

        public int Value
        {
            get { return _value; }
            set
            {
                _value = value;
                _valueArray = null;
                _valueArray = CreateIntArray(value);
            }
        }

        public int[] Array
        {
            get { return _valueArray; }
        }


        private string GetDebuggerDisplay()
        {
            return string.Format("Value = {0}", Value);
        }

        private static int[] CreateIntArray(int value)
        {
            string s = value.ToString();
            var intArray = new int[s.Length];

            for (int i = 0; i &lt; s.Length; i++)
                intArray[i] = int.Parse(s[i].ToString());

            return intArray;
        }
    }
}
</code></pre>

<p>Any help and criticism would be appreciated.</p>
