CodeNamespaceImportCollection.Count Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets the number of namespaces in the collection.

Namespace:   System.CodeDom
Assembly:  System (in System.dll)

public int Count { get; }

Property Value

Type: System.Int32

The number of namespaces in the collection.

The following code gets the count of items in a CodeNamespaceImportCollection object.

// Retrieves the count of the items in the collection.
int collectionCount = collection.Count;

.NET Framework
Available since 1.1
Return to top