Small Exercise
In a recent project, I got a list of integers something similar to following.
1 12 123 1234 12345 …. 123456789
and, I was asked to add zeros to the left or right of the list and make it as below.
List 1: 0000000001 0000000012 0000000123 ….. 0123456789
List 2: 1000000000 1200000000 1230000000 …. 1234567890
C# – PadLeft / PadRight
In C#, you can use PadLeft and PadRight functions to achieve this. ht…
View On WordPress












