line 21 of FloatEncoder.cs is... text.Substring(0, field.Length); it needs to be... text = text.Substring(0,field.Length); Line 21 is not assigning the substring to anything.