805 lines
34 KiB
HTML
805 lines
34 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Class SubList<T> | HiAPI-C# 2025 </title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="title" content="Class SubList<T> | HiAPI-C# 2025 ">
|
|
|
|
<meta name="description" content="Represents a sub-list view of a source list within a specified index range.">
|
|
<link rel="icon" href="../img/HiAPI.favicon.ico">
|
|
<link rel="stylesheet" href="../public/docfx.min.css">
|
|
<link rel="stylesheet" href="../public/main.css">
|
|
<meta name="docfx:navrel" content="../toc.html">
|
|
<meta name="docfx:tocrel" content="toc.html">
|
|
|
|
<meta name="docfx:rel" content="../">
|
|
|
|
|
|
|
|
<meta name="loc:inThisArticle" content="In this article">
|
|
<meta name="loc:searchResultsCount" content="{count} results for "{query}"">
|
|
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
|
<meta name="loc:tocFilter" content="Filter by title">
|
|
<meta name="loc:nextArticle" content="Next">
|
|
<meta name="loc:prevArticle" content="Previous">
|
|
<meta name="loc:themeLight" content="Light">
|
|
<meta name="loc:themeDark" content="Dark">
|
|
<meta name="loc:themeAuto" content="Auto">
|
|
<meta name="loc:changeTheme" content="Change theme">
|
|
<meta name="loc:copy" content="Copy">
|
|
<meta name="loc:downloadPdf" content="Download PDF">
|
|
|
|
<script type="module" src="./../public/docfx.min.js"></script>
|
|
|
|
<script>
|
|
const theme = localStorage.getItem('theme') || 'auto'
|
|
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
|
|
<header class="bg-body border-bottom">
|
|
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
|
|
<div class="container-xxl flex-nowrap">
|
|
<a class="navbar-brand" href="../index.html">
|
|
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
|
|
|
|
</a>
|
|
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
|
|
<i class="bi bi-three-dots"></i>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navpanel">
|
|
<div id="navbar">
|
|
<form class="search" role="search" id="search">
|
|
<i class="bi bi-search"></i>
|
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
</header>
|
|
|
|
<main class="container-xxl">
|
|
<div class="toc-offcanvas">
|
|
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
|
|
<div class="offcanvas-header">
|
|
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
|
|
</div>
|
|
<div class="offcanvas-body">
|
|
<nav class="toc" id="toc"></nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<div class="actionbar">
|
|
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
|
|
<i class="bi bi-list"></i>
|
|
</button>
|
|
|
|
<nav id="breadcrumb"></nav>
|
|
</div>
|
|
|
|
<article data-uid="Hi.Common.Collections.SubList`1">
|
|
|
|
|
|
|
|
<h1 id="Hi_Common_Collections_SubList_1" data-uid="Hi.Common.Collections.SubList`1" class="text-break">
|
|
Class SubList<T>
|
|
</h1>
|
|
|
|
<div class="facts text-secondary">
|
|
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.Common.html">Common</a>.<a class="xref" href="Hi.Common.Collections.html">Collections</a></dd></dl>
|
|
<dl><dt>Assembly</dt><dd>HiGeom.dll</dd></dl>
|
|
</div>
|
|
|
|
<div class="markdown summary"><p>Represents a sub-list view of a source list within a specified index range.</p>
|
|
</div>
|
|
<div class="markdown conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public class SubList<T> : IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
<h4 class="section">Type Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>T</code></dt>
|
|
<dd><p>The type of elements in the list.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl class="typelist inheritance">
|
|
<dt>Inheritance</dt>
|
|
<dd>
|
|
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
|
|
<div><span class="xref">SubList<T></span></div>
|
|
</dd>
|
|
</dl>
|
|
|
|
<dl class="typelist implements">
|
|
<dt>Implements</dt>
|
|
<dd>
|
|
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList</a><T></div>
|
|
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection</a><T></div>
|
|
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a><T></div>
|
|
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></div>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
<dl class="typelist inheritedMembers">
|
|
<dt>Inherited Members</dt>
|
|
<dd>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
|
|
</div>
|
|
</dd></dl>
|
|
|
|
<dl class="typelist extensionMethods">
|
|
<dt>Extension Methods</dt>
|
|
<dd>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.DuplicateUtil.html#Hi_Common_DuplicateUtil_TryDuplicate__1___0_System_Object___">DuplicateUtil.TryDuplicate<TSelf>(TSelf, params object[])</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke<TSrc>(TSrc, Action<TSrc>)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke<TSrc, TDst>(TSrc, Func<TSrc, TDst>)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_ToDotSplitedString__1_System_Collections_Generic_IEnumerable___0__">StringUtil.ToDotSplitedString<T>(IEnumerable<T>)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetCeilBySeek__2_System_Collections_Generic_IList___0____1_System_Func___0___1____0__System_Int32__System_Int32_Hi_Common_Collections_SeekDirection_">ListUtil.GetCeilBySeek<TItem, TKey>(IList<TItem>, TKey, Func<TItem, TKey>, out TItem, out int, int, SeekDirection)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetCeilIndexBySeek__2_System_Collections_Generic_IList___0____1_System_Func___0___1__System_Int32__System_Int32_Hi_Common_Collections_SeekDirection_">ListUtil.GetCeilIndexBySeek<TItem, TKey>(IList<TItem>, TKey, Func<TItem, TKey>, out int, int, SeekDirection)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetCeilIndex__2_System_Collections_Generic_IList___0____1_System_Func___0___1_System_Int32__System_Int32__">ListUtil.GetCeilIndex<Item, ItemKey>(IList<Item>, ItemKey, Func<Item, ItemKey, int>, out int)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetCeilIndex__2_System_Collections_Generic_IList___1____0_System_Func___1___0__System_Int32__">ListUtil.GetCeilIndex<TKey, Item>(IList<Item>, TKey, Func<Item, TKey>, out int)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetCeil__2_System_Collections_Generic_IList___1____0_System_Func___1___0____1__">ListUtil.GetCeil<TKey, Item>(IList<Item>, TKey, Func<Item, TKey>, out Item)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetFloorBySeek__2_System_Collections_Generic_IList___0____1_System_Func___0___1____0__System_Int32__System_Int32_Hi_Common_Collections_SeekDirection_">ListUtil.GetFloorBySeek<TItem, TKey>(IList<TItem>, TKey, Func<TItem, TKey>, out TItem, out int, int, SeekDirection)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetFloorIndexBySeek__2_System_Collections_Generic_IList___0____1_System_Func___0___1__System_Int32__System_Int32_Hi_Common_Collections_SeekDirection_">ListUtil.GetFloorIndexBySeek<TItem, TKey>(IList<TItem>, TKey, Func<TItem, TKey>, out int, int, SeekDirection)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetFloorIndex__2_System_Collections_Generic_IList___0____1_System_Func___0___1_System_Int32__System_Int32__">ListUtil.GetFloorIndex<Item, ItemKey>(IList<Item>, ItemKey, Func<Item, ItemKey, int>, out int)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetFloorIndex__2_System_Collections_Generic_IList___1____0_System_Func___1___0__System_Int32__">ListUtil.GetFloorIndex<TKey, Item>(IList<Item>, TKey, Func<Item, TKey>, out int)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetFloor__2_System_Collections_Generic_IList___1____0_System_Func___1___0____1__">ListUtil.GetFloor<TKey, Item>(IList<Item>, TKey, Func<Item, TKey>, out Item)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetIndexBasedEnumerable__1_System_Collections_Generic_IList___0__">ListUtil.GetIndexBasedEnumerable<TItem>(IList<TItem>)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetIndexBasedEnumerable__1_System_Collections_Generic_IList___0__System_Int32_System_Int32_">ListUtil.GetIndexBasedEnumerable<TItem>(IList<TItem>, int, int)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetIndexByBinarySearch__1_System_Collections_Generic_IList___0____0_">ListUtil.GetIndexByBinarySearch<TItem>(IList<TItem>, TItem)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetIndexByBinarySearch__1_System_Collections_Generic_IList___0____0_System_Collections_Generic_IComparer___0__">ListUtil.GetIndexByBinarySearch<TItem>(IList<TItem>, TItem, IComparer<TItem>)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetIndexByBinarySearch__2_System_Collections_Generic_IList___0____1_System_Func___1___0_System_Int32__">ListUtil.GetIndexByBinarySearch<TItem, TSearch>(IList<TItem>, TSearch, Func<TSearch, TItem, int>)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetNearestIndex__2_System_Collections_Generic_IList___0____1_System_Func___0___1_System_Double__System_Int32__">ListUtil.GetNearestIndex<TItem, TItemKey>(IList<TItem>, TItemKey, Func<TItem, TItemKey, double>, out int)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetNearestIndex__2_System_Collections_Generic_IList___0____1_System_Func___0___1_System_Int32__System_Func___0___1_System_Double__System_Int32__">ListUtil.GetNearestIndex<TItem, TItemKey>(IList<TItem>, TItemKey, Func<TItem, TItemKey, int>, Func<TItem, TItemKey, double>, out int)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_GetSubList__1_System_Collections_Generic_IList___0__System_Int32_System_Int32_">ListUtil.GetSubList<TItem>(IList<TItem>, int, int)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.Collections.ListUtil.html#Hi_Common_Collections_ListUtil_Swap__1_System_Collections_Generic_IList___0__System_Int32_System_Int32_">ListUtil.Swap<TItem>(IList<TItem>, int, int)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
|
|
</div>
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="section" id="constructors">Constructors
|
|
</h2>
|
|
|
|
|
|
<a id="Hi_Common_Collections_SubList_1__ctor_" data-uid="Hi.Common.Collections.SubList`1.#ctor*"></a>
|
|
|
|
<h3 id="Hi_Common_Collections_SubList_1__ctor_System_Collections_Generic_IList__0__System_Int32_System_Int32_" data-uid="Hi.Common.Collections.SubList`1.#ctor(System.Collections.Generic.IList{`0},System.Int32,System.Int32)">
|
|
SubList(IList<T>, int, int)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Initializes a new instance.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public SubList(IList<T> source, int beginIndex, int endIndex)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>source</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList</a><T></dt>
|
|
<dd><p>The source list.</p>
|
|
</dd>
|
|
<dt><code>beginIndex</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>The starting index (inclusive).</p>
|
|
</dd>
|
|
<dt><code>endIndex</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>The ending index (exclusive).</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="section" id="properties">Properties
|
|
</h2>
|
|
|
|
|
|
<a id="Hi_Common_Collections_SubList_1_Count_" data-uid="Hi.Common.Collections.SubList`1.Count*"></a>
|
|
|
|
<h3 id="Hi_Common_Collections_SubList_1_Count" data-uid="Hi.Common.Collections.SubList`1.Count">
|
|
Count
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Gets the number of elements contained in the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection<T></a>.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public int Count { get; }</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Property Value</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>The number of elements contained in the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection<T></a>.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Common_Collections_SubList_1_IsReadOnly_" data-uid="Hi.Common.Collections.SubList`1.IsReadOnly*"></a>
|
|
|
|
<h3 id="Hi_Common_Collections_SubList_1_IsReadOnly" data-uid="Hi.Common.Collections.SubList`1.IsReadOnly">
|
|
IsReadOnly
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Gets a value indicating whether the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection<T></a> is read-only.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public bool IsReadOnly { get; }</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Property Value</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
|
|
<dd><p><a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> if the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection<T></a> is read-only; otherwise, <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a>.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Common_Collections_SubList_1_Item_" data-uid="Hi.Common.Collections.SubList`1.Item*"></a>
|
|
|
|
<h3 id="Hi_Common_Collections_SubList_1_Item_System_Int32_" data-uid="Hi.Common.Collections.SubList`1.Item(System.Int32)">
|
|
this[int]
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Gets or sets the element at the specified index.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public T this[int index] { get; set; }</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>index</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>The zero-based index of the element to get or set.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Property Value</h4>
|
|
<dl class="parameters">
|
|
<dt><span class="xref">T</span></dt>
|
|
<dd><p>The element at the specified index.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Exceptions</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></dt>
|
|
<dd><p><code class="paramref">index</code> is not a valid index in the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList<T></a>.</p>
|
|
</dd>
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.notsupportedexception">NotSupportedException</a></dt>
|
|
<dd><p>The property is set and the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList<T></a> is read-only.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h2 class="section" id="methods">Methods
|
|
</h2>
|
|
|
|
|
|
<a id="Hi_Common_Collections_SubList_1_Add_" data-uid="Hi.Common.Collections.SubList`1.Add*"></a>
|
|
|
|
<h3 id="Hi_Common_Collections_SubList_1_Add__0_" data-uid="Hi.Common.Collections.SubList`1.Add(`0)">
|
|
Add(T)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Adds an item to the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection<T></a>.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void Add(T item)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>item</code> <span class="xref">T</span></dt>
|
|
<dd><p>The object to add to the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection<T></a>.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Exceptions</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.notsupportedexception">NotSupportedException</a></dt>
|
|
<dd><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection<T></a> is read-only.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<a id="Hi_Common_Collections_SubList_1_Clear_" data-uid="Hi.Common.Collections.SubList`1.Clear*"></a>
|
|
|
|
<h3 id="Hi_Common_Collections_SubList_1_Clear" data-uid="Hi.Common.Collections.SubList`1.Clear">
|
|
Clear()
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Removes all items from the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection<T></a>.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void Clear()</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Exceptions</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.notsupportedexception">NotSupportedException</a></dt>
|
|
<dd><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection<T></a> is read-only.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<a id="Hi_Common_Collections_SubList_1_Contains_" data-uid="Hi.Common.Collections.SubList`1.Contains*"></a>
|
|
|
|
<h3 id="Hi_Common_Collections_SubList_1_Contains__0_" data-uid="Hi.Common.Collections.SubList`1.Contains(`0)">
|
|
Contains(T)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Determines whether the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection<T></a> contains a specific value.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public bool Contains(T item)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>item</code> <span class="xref">T</span></dt>
|
|
<dd><p>The object to locate in the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection<T></a>.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
|
|
<dd><p><a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> if <code class="paramref">item</code> is found in the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection<T></a>; otherwise, <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a>.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Common_Collections_SubList_1_CopyTo_" data-uid="Hi.Common.Collections.SubList`1.CopyTo*"></a>
|
|
|
|
<h3 id="Hi_Common_Collections_SubList_1_CopyTo__0___System_Int32_" data-uid="Hi.Common.Collections.SubList`1.CopyTo(`0[],System.Int32)">
|
|
CopyTo(T[], int)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Copies the elements of the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection<T></a> to an <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.array">Array</a>, starting at a particular <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.array">Array</a> index.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void CopyTo(T[] array, int arrayIndex)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>array</code> T[]</dt>
|
|
<dd><p>The one-dimensional <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.array">Array</a> that is the destination of the elements copied from <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection<T></a>. The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.array">Array</a> must have zero-based indexing.</p>
|
|
</dd>
|
|
<dt><code>arrayIndex</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>The zero-based index in <code class="paramref">array</code> at which copying begins.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Exceptions</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
|
|
<dd><p><code class="paramref">array</code> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.</p>
|
|
</dd>
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></dt>
|
|
<dd><p><code class="paramref">arrayIndex</code> is less than 0.</p>
|
|
</dd>
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></dt>
|
|
<dd><p>The number of elements in the source <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection<T></a> is greater than the available space from <code class="paramref">arrayIndex</code> to the end of the destination <code class="paramref">array</code>.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<a id="Hi_Common_Collections_SubList_1_GetEnumerator_" data-uid="Hi.Common.Collections.SubList`1.GetEnumerator*"></a>
|
|
|
|
<h3 id="Hi_Common_Collections_SubList_1_GetEnumerator" data-uid="Hi.Common.Collections.SubList`1.GetEnumerator">
|
|
GetEnumerator()
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Returns an enumerator that iterates through the collection.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public IEnumerator<T> GetEnumerator()</code></pre>
|
|
</div>
|
|
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerator-1">IEnumerator</a><T></dt>
|
|
<dd><p>An enumerator that can be used to iterate through the collection.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Common_Collections_SubList_1_IndexOf_" data-uid="Hi.Common.Collections.SubList`1.IndexOf*"></a>
|
|
|
|
<h3 id="Hi_Common_Collections_SubList_1_IndexOf__0_" data-uid="Hi.Common.Collections.SubList`1.IndexOf(`0)">
|
|
IndexOf(T)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Determines the index of a specific item in the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList<T></a>.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public int IndexOf(T item)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>item</code> <span class="xref">T</span></dt>
|
|
<dd><p>The object to locate in the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList<T></a>.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>The index of <code class="paramref">item</code> if found in the list; otherwise, -1.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Hi_Common_Collections_SubList_1_Insert_" data-uid="Hi.Common.Collections.SubList`1.Insert*"></a>
|
|
|
|
<h3 id="Hi_Common_Collections_SubList_1_Insert_System_Int32__0_" data-uid="Hi.Common.Collections.SubList`1.Insert(System.Int32,`0)">
|
|
Insert(int, T)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Inserts an item to the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList<T></a> at the specified index.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void Insert(int index, T item)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>index</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>The zero-based index at which <code class="paramref">item</code> should be inserted.</p>
|
|
</dd>
|
|
<dt><code>item</code> <span class="xref">T</span></dt>
|
|
<dd><p>The object to insert into the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList<T></a>.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Exceptions</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></dt>
|
|
<dd><p><code class="paramref">index</code> is not a valid index in the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList<T></a>.</p>
|
|
</dd>
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.notsupportedexception">NotSupportedException</a></dt>
|
|
<dd><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList<T></a> is read-only.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<a id="Hi_Common_Collections_SubList_1_Remove_" data-uid="Hi.Common.Collections.SubList`1.Remove*"></a>
|
|
|
|
<h3 id="Hi_Common_Collections_SubList_1_Remove__0_" data-uid="Hi.Common.Collections.SubList`1.Remove(`0)">
|
|
Remove(T)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Removes the first occurrence of a specific object from the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection<T></a>.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public bool Remove(T item)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>item</code> <span class="xref">T</span></dt>
|
|
<dd><p>The object to remove from the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection<T></a>.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
|
|
<dd><p><a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> if <code class="paramref">item</code> was successfully removed from the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection<T></a>; otherwise, <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a>. This method also returns <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a> if <code class="paramref">item</code> is not found in the original <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection<T></a>.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Exceptions</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.notsupportedexception">NotSupportedException</a></dt>
|
|
<dd><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection<T></a> is read-only.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<a id="Hi_Common_Collections_SubList_1_RemoveAt_" data-uid="Hi.Common.Collections.SubList`1.RemoveAt*"></a>
|
|
|
|
<h3 id="Hi_Common_Collections_SubList_1_RemoveAt_System_Int32_" data-uid="Hi.Common.Collections.SubList`1.RemoveAt(System.Int32)">
|
|
RemoveAt(int)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Removes the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList<T></a> item at the specified index.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void RemoveAt(int index)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>index</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>The zero-based index of the item to remove.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Exceptions</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></dt>
|
|
<dd><p><code class="paramref">index</code> is not a valid index in the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList<T></a>.</p>
|
|
</dd>
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.notsupportedexception">NotSupportedException</a></dt>
|
|
<dd><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList<T></a> is read-only.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</article>
|
|
|
|
<div class="contribution d-print-none">
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="affix">
|
|
<nav id="affix"></nav>
|
|
</div>
|
|
</main>
|
|
|
|
<div class="container-xxl search-results" id="search-results"></div>
|
|
|
|
<footer class="border-top text-secondary">
|
|
<div class="container-xxl">
|
|
<div class="flex-fill">
|
|
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
</html>
|