Activity.GetActivityByName Method (String, Boolean)

Returns the instance of the Activity whose name is requested from the set of all activities under the root the Activity of this instance if the second parameter is false and under the current Activity if the second parameter is true.

Namespace: System.Workflow.ComponentModel
Assembly: System.Workflow.ComponentModel (in system.workflow.componentmodel.dll)

public Activity GetActivityByName (
	string activityQualifiedName,
	bool withinThisActivityOnly
)
public Activity GetActivityByName (
	String activityQualifiedName, 
	boolean withinThisActivityOnly
)
public function GetActivityByName (
	activityQualifiedName : String, 
	withinThisActivityOnly : boolean
) : Activity
Not applicable.

Parameters

activityQualifiedName

The name of the Activity to search for.

withinThisActivityOnly

Value indicating whether to limit the search to activities contained within this instance.

Return Value

The instance of the Activity whose name is requested from the set of all activities under the root the Activity of this instance if the second parameter is false and under the current Activity if the second parameter is true.

Exception typeCondition

ArgumentNullException

activityQualifiedID is a null reference (Nothing in Visual Basic).

Returns the instance of the Activity whose name is requested from the set of all activities under the root the Activity of this instance if the second parameter is false and under the current Activity if the second parameter is true.

Calling GetActivityByName from within the constructor of a custom activity is not supported and can have unexpected results.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Show: