示例#1
0
        public void GetEnumeratorWorks()
        {
            var arr = new Uint8Array(new byte[] { 3, 6, 2, 9, 5 });
            var l   = new List <int>();
            var enm = arr.GetEnumerator();

            while (enm.MoveNext())
            {
                l.Add(enm.Current);
            }
            Assert.AreEqual(l, new[] { 3, 6, 2, 9, 5 });
        }
		public void GetEnumeratorWorks() {
			var arr = new Uint8Array(new byte[] { 3, 6, 2, 9, 5 });
			var l = new List<int>();
			var enm = arr.GetEnumerator();
			while (enm.MoveNext()) {
				l.Add(enm.Current);
			}
			Assert.AreEqual(l, new[] { 3, 6, 2, 9, 5 });
		}