Share via


ModuleListPageSearchField.Name Property

Definition

Gets the name of the search parameter.

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

Property Value

The name of the search parameter.

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