private void openARCToolStripMenuItem_Click(object sender, EventArgs e) { using (OpenFileDialog d = new OpenFileDialog()) { d.FileName = "data.arc"; d.Filter += "Smash Ultimate ARC|*.arc"; if (d.ShowDialog() == DialogResult.OK) { Cursor.Current = Cursors.WaitCursor; Stopwatch s = new Stopwatch(); s.Start(); ArcFile.InitFileSystem(d.FileName); System.Diagnostics.Debug.WriteLine("parse arc: " + s.Elapsed.Milliseconds); s.Restart(); InitFileSystem(); System.Diagnostics.Debug.WriteLine("init nodes: " + s.Elapsed.Milliseconds); s.Restart(); Cursor.Current = Cursors.Arrow; label1.Text = "Arc Version: " + ArcFile.Version.ToString("X"); updateHashesToolStripMenuItem.Enabled = false; Version = ArcFile.Version; FilePath = d.FileName; HashDict.Unload(); } } }
static void Main(string[] args) { HashDict <char, int> table = new HashDict <char, int>(); string input = Console.ReadLine(); foreach (var letter in input) { if (!table.ContainsKey(letter)) { table.Add(letter, 1); } else { table[letter]++; } } foreach (var letter in table.Keys) { Console.WriteLine($"{letter}: {table[letter]} time/s"); } Console.ReadLine(); }
public OrderedSet() { this.set = new HashDict <T, Node <T> >(); this.root = null; this.Count = 0; }