Share via


ModuleListPageSearchField.ToString Method

Definition

Returns the name of the object.

public:
 override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String

Returns

The name of the object.

Examples

The following example creates a new ModuleListPageSearchField object and displays its properties. The following output is displayed in the trace listener.

Name "Color"

Text "Colour"

ToString() "Colour"

protected override ModuleListPageSearchField[] 
    SearchFields {
    get {
        if (_searchFields != null)
            return _searchFields;

        _searchFields =
            new ModuleListPageSearchField[] {
                new ModuleListPageSearchField(
                "Color", "Colour"),
                new ModuleListPageSearchField(
                "Type 1", "Type 2")
            };
        return _searchFields;
    }
} 
void TraceModuleListPageSearchFieldArray() {

    if (_searchFields == null ||
        _searchFields.Length < 1)
        return;
    ModuleListPageSearchField mlpsf =
            _searchFields[0];

    Trace.WriteLine("Name \"" + mlpsf.Name + "\"");
    Trace.WriteLine("Text \"" + mlpsf.Text + "\"");
    Trace.WriteLine("ToString() \"" + 
        mlpsf.ToString() + "\"");
} 

Applies to