## CommentCollection class

封装了一个集合[`Comment`](../comment)对象.

```csharp
public class CommentCollection : CollectionBase<Comment>
```

## 特性

| 姓名 | 描述 |
| --- | --- |
| [Capacity](../../aspose.cells/collectionbase`1/capacity) { get; set; } |  |
| [Count](../../aspose.cells/collectionbase`1/count) { get; } |  |
| [Item](../../aspose.cells/commentcollection/item) { get; } | 获取[`Comment`](../comment)指定索引处的元素。 (3 indexers) |
| [Item](../../aspose.cells/collectionbase`1/item) { get; set; } |  |

## 方法

| 姓名 | 描述 |
| --- | --- |
| [Add](../../aspose.cells/commentcollection/add#add_1)(string) | 向集合添加评论。 |
| [Add](../../aspose.cells/commentcollection/add#add)(int, int) | 向集合添加评论。 |
| [AddThreadedComment](../../aspose.cells/commentcollection/addthreadedcomment#addthreadedcomment_1)(string, string, ThreadedCommentAuthor) | 添加线程注释。 |
| [AddThreadedComment](../../aspose.cells/commentcollection/addthreadedcomment#addthreadedcomment)(int, int, string, ThreadedCommentAuthor) | 添加线程注释。 |
| [BinarySearch](../../aspose.cells/collectionbase`1/binarysearch)(Comment) |  |
| [BinarySearch](../../aspose.cells/collectionbase`1/binarysearch)(Comment, IComparer&lt;Comment&gt;) |  |
| [BinarySearch](../../aspose.cells/collectionbase`1/binarysearch)(int, int, Comment, IComparer&lt;Comment&gt;) |  |
| [Clear](../../aspose.cells/commentcollection/clear#clear)() | 删除所有评论； (2 methods) |
| [Contains](../../aspose.cells/collectionbase`1/contains)(Comment) |  |
| [CopyTo](../../aspose.cells/collectionbase`1/copyto)(Comment[]) |  |
| [CopyTo](../../aspose.cells/collectionbase`1/copyto)(Comment[], int) |  |
| [CopyTo](../../aspose.cells/collectionbase`1/copyto)(int, Comment[], int, int) |  |
| [Exists](../../aspose.cells/collectionbase`1/exists)(Predicate&lt;Comment&gt;) |  |
| [Find](../../aspose.cells/collectionbase`1/find)(Predicate&lt;Comment&gt;) |  |
| [FindAll](../../aspose.cells/collectionbase`1/findall)(Predicate&lt;Comment&gt;) |  |
| [FindIndex](../../aspose.cells/collectionbase`1/findindex)(Predicate&lt;Comment&gt;) |  |
| [FindIndex](../../aspose.cells/collectionbase`1/findindex)(int, Predicate&lt;Comment&gt;) |  |
| [FindIndex](../../aspose.cells/collectionbase`1/findindex)(int, int, Predicate&lt;Comment&gt;) |  |
| [FindLast](../../aspose.cells/collectionbase`1/findlast)(Predicate&lt;Comment&gt;) |  |
| [FindLastIndex](../../aspose.cells/collectionbase`1/findlastindex)(Predicate&lt;Comment&gt;) |  |
| [FindLastIndex](../../aspose.cells/collectionbase`1/findlastindex)(int, Predicate&lt;Comment&gt;) |  |
| [FindLastIndex](../../aspose.cells/collectionbase`1/findlastindex)(int, int, Predicate&lt;Comment&gt;) |  |
| [GetEnumerator](../../aspose.cells/collectionbase`1/getenumerator)() |  |
| [GetThreadedComments](../../aspose.cells/commentcollection/getthreadedcomments#getthreadedcomments_1)(string) | 按单元格名称获取线程注释。 |
| [GetThreadedComments](../../aspose.cells/commentcollection/getthreadedcomments#getthreadedcomments)(int, int) | 按行列索引获取线程评论。 |
| [IndexOf](../../aspose.cells/collectionbase`1/indexof)(Comment) |  |
| [IndexOf](../../aspose.cells/collectionbase`1/indexof)(Comment, int) |  |
| [IndexOf](../../aspose.cells/collectionbase`1/indexof)(Comment, int, int) |  |
| [LastIndexOf](../../aspose.cells/collectionbase`1/lastindexof)(Comment) |  |
| [LastIndexOf](../../aspose.cells/collectionbase`1/lastindexof)(Comment, int) |  |
| [LastIndexOf](../../aspose.cells/collectionbase`1/lastindexof)(Comment, int, int) |  |
| [RemoveAt](../../aspose.cells/collectionbase`1/removeat)(int) |  |
| [RemoveAt](../../aspose.cells/commentcollection/removeat#removeat_2)(string) | 删除特定单元格的注释。 |
| [RemoveAt](../../aspose.cells/commentcollection/removeat#removeat_1)(int, int) | 删除特定单元格的注释。 |

### 例子

```csharp
[C#]

Workbook workbook = new Workbook();

CommentCollection comments = workbook.Worksheets[0].Comments;

//做你的事

[Visual Basic]

Dim workbook as Workbook = new Workbook()

Dim comments as CommentCollection = workbook.Worksheets(0).Comments
```

### 也可以看看

* class [CollectionBase&lt;T&gt;](../collectionbase-1)
* class [Comment](../comment)
* 命名空间 [Aspose.Cells](../../aspose.cells)
* 部件 [Aspose.Cells](../../)

<!-- DO NOT EDIT: generated by xmldocmd for Aspose.Cells.dll -->
