dotnet / dotnet/dotnet-api-docs

翻译误人

Open
#10,358 2 comments 0 reactions 0 assignees View on GitHub
area-System.Collections doc-bug Pri3 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

[List en-us](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1.trimexcess?view=net-8.0&redirectedfrom=MSDN#System_Collections_Generic_List_1_TrimExcess)
[List zh-cn](https://learn.microsoft.com/zh-cn/dotnet/api/system.collections.generic.list-1.trimexcess?view=net-8.0&redirectedfrom=MSDN#System_Collections_Generic_List_1_TrimExcess)

To reset a [List](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1?view=net-8.0) to its initial state, call the [Clear](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1.clear?view=net-8.0) method before calling the [TrimExcess](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1.trimexcess?view=net-8.0) method. Trimming an empty [List](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1?view=net-8.0) sets the capacity of the [List](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1?view=net-8.0) to the default capacity.

若要将 重置 [List](https://learn.microsoft.com/zh-cn/dotnet/api/system.collections.generic.list-1?view=net-8.0) 为其初始状态,请在 [Clear](https://learn.microsoft.com/zh-cn/dotnet/api/system.collections.generic.list-1.clear?view=net-8.0) 调用 方法之前调用 [TrimExcess](https://learn.microsoft.com/zh-cn/dotnet/api/system.collections.generic.list-1.trimexcess?view=net-8.0) 方法。 剪裁空 [List](https://learn.microsoft.com/zh-cn/dotnet/api/system.collections.generic.list-1?view=net-8.0) 会将 的 [List](https://learn.microsoft.com/zh-cn/dotnet/api/system.collections.generic.list-1?view=net-8.0) 容量设置为默认容量。

一样嘛?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.