src/Microsoft.PowerShell.GraphicalHost/ManagementList/ManagementList/DefaultStringConverter.cs
/// <summary>
/// Converts the value of the single <see cref="Binding"/> in the
/// <see cref="IMultiValueConverter"/> to a string,
/// and returns that string if not null/empty,
/// otherwise returns DefaultValue.
/// </summary>
/// <param name="values">
/// Must contain exactly one value, of any type.
/// </param>
/// <param name="targetType">The parameter is not used.</param>
/// <param name="parameter">The parameter is not used.</param>
/// <param name="culture">The parameter is not used.</param>
/// <returns>
/// A string, either the value of the first <see cref="Binding"/>
/// converted to string, or DefaultValue.
/// </returns>
/// <remarks>
/// Note that the <see cref="MultiBinding"/> which uses this
/// <see cref="IMultiValueConverter"/> must have exactly one
/// <see cref="Binding"/>.
/// </remarks>
Converts the value of the single  in the
to a string,
and returns that string if not null/empty,
otherwise returns DefaultValue.
Converts the value of the single in the to a string and returns that string if not null / empty otherwise returns DefaultValue .
public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (values == null || 1 != values.Length)
            {
                throw new ArgumentNullException("values");
            }
            string val = values[0] as string;
            if (!String.IsNullOrEmpty(val))
            {
                return val;
            }
            return this.DefaultValue;
        }
public object Convert ( object [ ] values , Type targetType , object parameter , System . Globalization . CultureInfo culture ) { if ( values == null || 1 != values . Length ) { throw new ArgumentNullException ( " " ) ; } string val = values [ 0 ] as string ; if ( ! String . IsNullOrEmpty ( val ) ) { return val ; } return this . DefaultValue ; }
Converts the value of the single  in the
to a string,
and returns that string if not null/empty,
otherwise returns DefaultValue.
Converts the value of the single in the to a string and returns that string if not null / empty otherwise returns DefaultValue .
A string, either the value of the first
converted to string, or DefaultValue.
A string either the value of the first converted to string or DefaultValue .
values
object[]
Must contain exactly one value, of any type.
Must contain exactly one value of any type .
targetType
Type
The parameter is not used.
The parameter is not used .
parameter
object
The parameter is not used.
The parameter is not used .
culture
System.Globalization.CultureInfo
The parameter is not used.
The parameter is not used .
remarks
Note that the  which uses this
must have exactly one
.
Note that the which uses this must have exactly one .