This repository was archived by the owner on Nov 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
43 lines (38 loc) · 1.36 KB
/
Program.cs
File metadata and controls
43 lines (38 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System;
using System.IO;
using System.Reflection;
namespace followthewhiterabbit
{
class Program
{
static void Main(string[] args)
{
var assembly = Assembly.GetExecutingAssembly();
var resourceName = typeof(Program).Namespace + ".wordlist";
string wordlist = "";
using (Stream stream = assembly.GetManifestResourceStream(resourceName))
using (StreamReader reader = new StreamReader(stream))
{
wordlist = reader.ReadToEnd();
}
try
{
WordManager manager = new WordManager();
manager.ReadWordsFrom(wordlist);
using (AnagramFinder finder = new AnagramFinder(manager))
{
finder.FindAnagrams("e4820b45d2277f3844eac66c903e84be",
"23170acc097c24edb98fc5488ab033fe",
"665e5bcb0c20062fe8abaaf4628bb154");
}
}
catch (Exception ex)
{
Console.WriteLine("Error occured: {0}", ex.Message);
Console.WriteLine("Stack: {0}", ex.StackTrace);
}
Console.WriteLine("Enter any key to exit...");
Console.ReadLine();
}
}
}