Share via


TaskItem.Text Property

Definition

Gets the text that is set in the TaskList() constructor.

public:
 property System::String ^ Text { System::String ^ get(); };
public string Text { get; }
member this.Text : string
Public ReadOnly Property Text As String

Property Value

The text that is set in the TaskList() constructor.

Examples

The following example creates a MethodTaskItem object and sends the value of the Text property to the trace listener. The output is as follows:

Text :Navigate admin

MethodTaskItem ti = new MethodTaskItem(
                  "Nav",                  // Method Name
                  "Navigate admin",      // Menu item Text
                  sDemoCat);
Trace.WriteLine("Text :" + ti.Text);

items.Add(ti);

Applies to