示例#1
0
        public static bool TryRemove <T>(this LinkedListNode <T> node)
        {
            node.EnsureNotNull(nameof(node));
            //
            var list = node.List;

            if (list is null)
            {
                return(false);
            }
            else
            {
                try {
                    list.Remove(node);
                    return(true);
                } catch (InvalidOperationException) {
                    return(false);
                }
            }
        }
示例#2
0
 internal P_LinkTag(LinkedListNode <TComponent> innerListNode)
 {
     innerListNode.EnsureNotNull(nameof(innerListNode));
     //
     InnerListNode = innerListNode;
 }