Share via


IVsProject4.ContainsFileWithItemType Method

Determines whether the project contains a file whose MSBuild ItemType matches the specified type.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.10.0 (in Microsoft.VisualStudio.Shell.Interop.10.0.dll)

Syntax

'Declaration
Function ContainsFileWithItemType ( _
    pszItemType As String, _
    <OutAttribute> ByRef pfDoesContain As Integer _
) As Integer
int ContainsFileWithItemType(
    string pszItemType,
    out int pfDoesContain
)
int ContainsFileWithItemType(
    [InAttribute] String^ pszItemType, 
    [OutAttribute] int% pfDoesContain
)
abstract ContainsFileWithItemType : 
        pszItemType:string * 
        pfDoesContain:int byref -> int
function ContainsFileWithItemType(
    pszItemType : String, 
    pfDoesContain : int
) : int

Parameters

  • pszItemType
    Type: String

    The item type.

  • pfDoesContain
    Type: Int32%

    true if the project contains at least one file of the given type. The comparison is case-insensitive.

Return Value

Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

This method should be used if the caller wants to know only whether such a value exists, but has no interest in the number of ITEMIDs of the matches, because the method returns immediately after finding a single match.

.NET Framework Security

See Also

Reference

IVsProject4 Interface

Microsoft.VisualStudio.Shell.Interop Namespace