ContainerLabelCollection Class

A collection of labels applied to a container or a volume.

public sealed class ContainerLabelCollection : IEnumerable<KeyValuePair<string, string>>, IEnumerable
Implements

Properties

NameDescription
CountGets the number of labels in the collection.

Gets the number of labels in the collection.

public int Count { get; }

Property value

int

Methods

NameDescription
Add(string, string)Adds or replaces a label.
Contains(string)Determines whether a label is defined.
GetEnumerator()Returns an enumerator over the labels.
Remove(string)Removes a label.
System.Collections.IEnumerable.GetEnumerator()

Add(string, string)

ContainerLabelCollection.cs

Adds or replaces a label.

public void Add(string name, string value)

Parameters

name string
The label name.
value string
The label value.

Determines whether a label is defined.

public bool Contains(string name)

Parameters

name string
The label name.

Returns

bool true if the label is defined; otherwise, false.

Returns an enumerator over the labels.

public IEnumerator<KeyValuePair<string, string>> GetEnumerator()

Removes a label.

public bool Remove(string name)

Parameters

name string
The label name.

Returns

bool true if the label was removed; otherwise, false.

System.Collections.IEnumerable.GetEnumerator()

ContainerLabelCollection.cs
IEnumerator IEnumerable.GetEnumerator()

No documentation is available.