This file contains hidden or 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
public static void Main(string[] args) | |
{ | |
var path = @"C:\Users\bob\Downloads\AliceInWonderland.txt"; | |
path = @"C:\Users\bob\Downloads\Frankenstein.txt"; | |
path = @"C:\Users\bob\Downloads\MobyDick.txt"; | |
var text = File.ReadAllText(path); | |
// add numbers in front of each line | |
var lines = text.Split(["\r\n", "\n"], StringSplitOptions.None); | |
var digits = Math.Floor(Math.Log10(lines.Length) + 1); |
OlderNewer