Example #1
0
        static void Main(string[] args)
        {
            var titleModel   = new TitleModel("Instantiating  delegati");
            var consoleModel = new ConsoleModel();

            consoleModel.ForegroundColor = ConsoleColor.Yellow;
            Console.WriteLine(titleModel.ToString());
            consoleModel.Title = "Delegate first part";

            SuperHash hash   = new SuperHash(Hash3);
            SuperHash unhash = new SuperHash(Unhash);

            var textToHash = "LANACO";

            Console.WriteLine("Text before hashing: \t" + textToHash);
            textToHash = hash(textToHash);
            Console.WriteLine("1. Hash:\t" + textToHash);
            Console.WriteLine("2. Unhash:\t" + unhash(textToHash));

            Console.ReadKey(true);
        }
Example #2
0
        static void Main(string[] args)
        {
            var titleModel   = new TitleModel("Multicast delegati");
            var consoleModel = new ConsoleModel();

            consoleModel.ForegroundColor = ConsoleColor.Yellow;
            Console.WriteLine(titleModel.ToString());
            consoleModel.Title = "Delegate first part";

            Console.WriteLine("Text before hashing: \t" + textToHash);

            SuperHash reverse = new SuperHash(Reverse);
            SuperHash hash    = new SuperHash(Hash3);

            SuperHash superHash = reverse;

            superHash += hash;

            Console.WriteLine("Hash text:\t" + superHash());

            Console.ReadKey(true);
        }
Example #3
0
 /// <summary>
 /// Очистить множество
 /// </summary>
 public void Clear()
 {
     items = new SuperHash <T>(Count);
 }
Example #4
0
 public HashTableSet(int size)
 {
     items = new SuperHash <T>(size);
 }