how to create int to string like this 50-> "00050" : <p>Hello i am trying to process character arrays.
I want to assign the number 50 as string value "00050". How can I do it ?</p>

<pre><code>enter code here
 string strRpc(int NumstrRpcSendLen)
    {
        int digit =  Convert.ToInt32( Math.Floor(Math.Log10(NumstrRpcSendLen + 5) + 1));
        int len = 0;
        char[] d = new char[5];
        string result= null;


        while (len&lt;5)
        {
            if (len&lt;digit)
            {
                d[len] = '0';
            }
            else
            {




            }

            len++;
        }

        return result;

       }
</code></pre>
