共用方式為


ImportCollection Class

Represents a collection of all Import elements in a project.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Inheritance Hierarchy

System.Object
  Microsoft.Build.BuildEngine.ImportCollection

Namespace:  Microsoft.Build.BuildEngine
Assembly:  Microsoft.Build.Engine (in Microsoft.Build.Engine.dll)

Syntax

'Declaration
Public Class ImportCollection _
    Implements IEnumerable, ICollection
public class ImportCollection : IEnumerable, 
    ICollection
public ref class ImportCollection : IEnumerable, 
    ICollection
type ImportCollection =  
    class 
        interface IEnumerable 
        interface ICollection 
    end
public class ImportCollection implements IEnumerable, ICollection

The ImportCollection type exposes the following members.

Properties

  Name Description
Public property Count Gets a value indicating the number of Import objects in the ImportCollection.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public property IsSynchronized Gets a value indicating whether access to the ImportCollection is synchronized (thread safe).MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public property SyncRoot Gets an object that can be used to synchronize access to the ImportCollection.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Top

Methods

  Name Description
Public method AddNewImport Allows hosts to programmatically add a new <Import> tag to a project file being manipulated by the host.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public method CopyTo(Array, Int32) Copies the entire ImportCollection to a compatible one-dimensional Array, starting at the specified index of the target array.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public method CopyTo(array<Import[], Int32) Copies the entire ImportCollection to a compatible one-dimensional Array of Import objects, starting at the specified index of the target array.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetEnumerator Gets an enumerator that iterates through the ImportCollection.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method RemoveImport Allows hosts to programmatically remove <Import> tags that are part of a project file being manipulated by the host.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Public method ToString (Inherited from Object.)

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Build.BuildEngine Namespace