Span<T>.Clear 方法

定义

清除此 Span<T> 对象的内容。Clears the contents of this Span<T> object.

public:
 void Clear();
public void Clear ();
member this.Clear : unit -> unit
Public Sub Clear ()

注解

Clear方法将对象中的项设置 Span<T> 为其默认值。The Clear method sets the items in the Span<T> object to their default values. 它不会从中删除项 Span<T>It does not remove items from the Span<T>.

适用于