In interviews candidates are often asked to write the code to reverse the characters in a string. For example, “Hello World” becomes “dlroW olleH”. But can you do it in a single line of C#?
Answer:
using System; using System.Linq; … Console.WriteLine(new string("Reverse this string using only a single line of code".ToCharArray().Reverse().ToArray()));
Found this classic from 2004 lurking around a backup folder: