Version

TaskFromName(String,StringComparison) Method

Returns the first Task with the specified name that is associated with this Project, or null if no such task exists.
Syntax
'Declaration
 
Public Overloads Function TaskFromName( _
   ByVal name As String, _
   ByVal comparisonType As StringComparison _
) As Task
public Task TaskFromName( 
   string name,
   StringComparison comparisonType
)

Parameters

name
The value of the task's Name property.
comparisonType
A StringComparison constant which specified how character casing factors into the search.

Return Value

A Task object or null if no task was found.
Remarks

Note that since uniqueness is not enforced among the Name property for the tasks which belong to the same project, this method returns the first task in the list. For an unambiguous search, use the TaskFromRowNumber method.

Specifying null or an empty string for the value of the name parameter results in a null return value, regardless of whether any tasks exist in this project that have no name assigned to them.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also