Exemplo n.º 1
0
                public bool MoveNext()
                {
                    if (_version != _dictionary._version)
                    {
                        throw CollectionExceptions.InvalidOperation_EnumerationFailedVersion();
                    }

                    while ((uint)_index < (uint)_dictionary._count)
                    {
                        ref Entry entry = ref _dictionary._entries ![_index++];
Exemplo n.º 2
0
        public void TestEnumerableDencryption()
        {
            string[] word   = new string[] { "Tikv", "Mx", "H", "Tfuw" };
            string   answer = "";

            foreach (string item in CollectionExceptions.Dencrypt(word, "abcdefh"))
            {
                answer += item;
            }
            Assert.AreEqual(answer, "ThisIsATest");
        }
Exemplo n.º 3
0
        public void TestEnumerableEncryption()
        {
            string[] word   = new string[] { "This", "Is", "A", "Test" };
            string   answer = "";

            foreach (string item in CollectionExceptions.Encrypt(word, "abcdefh"))
            {
                answer += item;
            }
            Assert.AreEqual(answer, "TikvMxHTfuw");
        }