Home > Backend Development > C#.Net Tutorial > What does the IList interface in C# do?

What does the IList interface in C# do?

WBOY
Release: 2023-08-28 16:13:02
forward
1377 people have browsed it

C# 中的 IList 接口有什么作用?

The IList interface has a non-generic collection of objects that can be accessed individually through an index.

The following are the properties of the IList interface in C#-

isReadOnly

Gets a value indicating whether the IList is read-only.

Mr. Number Property name and description th>
1 Count

Get the number of elements contained in the numeric ICollection.

2 isFixedSize

Gets a value indicating whether the IList has a fixed size.

3
4 isSynchronized

Gets a value indicating whether access to the ICollection is synchronized.

5 Item(Int32)

Gets or sets the element at the specified position

The following are the methods of the IList interface-

Mr. Number Attributes Name and Description
1 Add(Obj)

Add items to IList.

2 Clear()

Remove all items from IList

3 Contains(Obj)

Whether the list contains a specific value

4 td> GetEnumerator()

Returns the enumerator

5 IndexOf(Obj)

The index of the specified item in IList

6 Remove(Obj)

This method deletes the first occurrence of a specific object. p>

The above is the detailed content of What does the IList interface in C# do?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template