示例#1
0
        public void GetLength_ThrowsError_ForKnottedList()
        {
            var head = new LinkedListNode <int>(1);

            head.Next = head;

            Assert.Throws <InvalidOperationException>(() => head.GetLength());
        }
示例#2
0
        protected override int?OnInitComplexity(LinkedListNode <int> arg)
        {
            if (arg == null)
            {
                throw new ArgumentNullException("arg");
            }

            return(arg.GetLength());
        }
 protected override int?OnInitComplexity(LinkedListNode <int> arg)
 {
     return(arg.GetLength());
 }