Convert decimal to string
You don't really need to know the length of the fractional part.  Simply separate the fractional from the integral and handle each one separately.

static string DecToStr(decimal value)
{
    int integral = 0;
    decimal fractional = 0;
    SplitDecimal(value, out integral, out fractional);
    StringBuilder sb = new StringBuilder();
    while(integral &gt; 0)
    {
        sb.Insert(0,integral % 10);
        integral /= 10;
    }
    sb.Append('.');
    while(fractional != 0)
    {
        int temp = 0;
        SplitDecimal(fractional * 10, out temp, out fractional);
        sb.Append(temp);
    }
    return sb.ToString();
}
static void SplitDecimal(decimal value,out int integral,out decimal fractional)
{
    integral = (int)value;
    fractional = value - integral;
}


EDIT  added check for negative

static string DecToStr(decimal value)
{
    int integral = 0;
    decimal fractional = 0;
    StringBuilder sb = new StringBuilder();
    if(value &lt; 0)
    {
        value *= -1;
        sb.Append('-');
    }
    SplitDecimal(value, out integral, out fractional);
    while(integral &gt; 0)
    {
        sb.Insert(0,integral % 10);
        integral /= 10;
    }
    sb.Append('.');
    while(fractional != 0)
    {
        int temp = 0;
        SplitDecimal(fractional * 10, out temp, out fractional);
        sb.Append(temp);
    }
    return sb.ToString();
}
static void SplitDecimal(decimal value,out int integral,out decimal fractional)
{
    integral = (int)value;
    fractional = value - integral;
}