Hello i am trying to process character arrays. I want to assign the number 50 as string value "00050". How can I do it ?
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<5)
{
if (len<digit)
{
d[len] = '0';
}
else
{
}
len++;
}
return result;
}