A string of character 'x' the same length as string 'y'
... is quite simple in .net, as I found out!
string title = "My line of text that I'm writing to the console underlined with equals signs";
Console.WriteLine(title);
Console.WriteLine(new String('=', title.Length));