Created
June 2, 2015 07:08
-
-
Save kmorcinek/80f2f831d36b01606253 to your computer and use it in GitHub Desktop.
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
private IEnumerable<string> GetAlphabetVariations() | |
{ | |
char[] alphabet = "abcdefghijklmnopqrstuvwxyz".ToCharArray(); | |
foreach (var first in alphabet) | |
{ | |
foreach (var second in alphabet) | |
{ | |
yield return "" + first + second; | |
} | |
} | |
// Use recursion for longer strings. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment