Opc.Ua.ContentFilterElement.ToString C# (CSharp) Method

ToString() public method

Formats the value of the current instance using the specified format.
public ToString ( string format, IFormatProvider formatProvider ) : string
format string The specifying the format to use. /// -or- /// null to use the default format defined for the type of the implementation.
formatProvider IFormatProvider The to use to format the value. /// -or- /// null to obtain the numeric format information from the current locale setting of the operating system.
return string
        public string ToString(string format, IFormatProvider formatProvider)
        {
            if (format == null)
            {
                StringBuilder buffer = new StringBuilder();

                buffer.AppendFormat(formatProvider, "<{0}", this.FilterOperator);

                for (int ii = 0; ii < this.FilterOperands.Count; ii++)
                {
                    if (this.FilterOperands[ii] != null)
                    {
                        buffer.AppendFormat(formatProvider, ", {0}", this.FilterOperands[ii].Body);
                    }
                    else
                    {
                        buffer.AppendFormat(formatProvider, ", (null)");
                    }
                }

                buffer.AppendFormat(formatProvider, ">");

                return buffer.ToString();
            }

            throw new FormatException(Utils.Format("Invalid format string: '{0}'.", format));
        }
        #endregion

Same methods

ContentFilterElement::ToString ( ) : string
ContentFilterElement::ToString ( INodeTable nodeTable ) : string