Sdílet prostřednictvím


Project.GetItems(String) Method

Definition

All the items in the project of the specified type. If there are none, returns an empty list. Use AddItem or RemoveItem to modify items in this project.

public:
 System::Collections::Generic::ICollection<Microsoft::Build::Evaluation::ProjectItem ^> ^ GetItems(System::String ^ itemType);
public System.Collections.Generic.ICollection<Microsoft.Build.Evaluation.ProjectItem> GetItems (string itemType);
member this.GetItems : string -> System.Collections.Generic.ICollection<Microsoft.Build.Evaluation.ProjectItem>
Public Function GetItems (itemType As String) As ICollection(Of ProjectItem)

Parameters

itemType
String

The item type to be retrieved.

Returns

All the items in the project of the given item type, or an empty list if there are no items with the given item name.

Remarks

Use AddItem or RemoveItem to modify items in this project.

Applies to