Created
February 27, 2017 16:51
-
-
Save gazlu/5ea78cbad13bf0017a1578ea649e9250 to your computer and use it in GitHub Desktop.
Append Char before string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string name = "420"; | |
var prefix = "0"; | |
prefix += new string('0', 10 - name.Length - 1); | |
Console.WriteLine(zeros+name); | |
Console.WriteLine((zeros+name).Length); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment