Created
September 22, 2022 22:01
-
-
Save jasmin-mistry/81699650d585decee306bbbedd3ffa38 to your computer and use it in GitHub Desktop.
String Width & Alignment
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
var number = 1; | |
new List<string> | |
{ | |
$"|{number}|", // |1| | |
$"|{number, -10}|", // |1 | | |
$"|{number, 10}|" // | 1| | |
}.ForEach(Console.WriteLine); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment