Format string length

With this command its possible format the length of the string.

String.Format("{0,5}", comprimento)+" "+ String.Format("{0,5}", altura)

Show the result

06000 02800



Example
sw.WriteLine(String.Format("{0,5}", comprimento)+" "+ String.Format("{0,5}", altura) + "+ 0000 + 0000 + 0000 + 0000 0 00000 0 00000 000000 000000 + 00 + 00"); //26



Comentários

Mensagens populares