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

ToString() public method

Returns the string representation of the object.
public ToString ( string format, IFormatProvider formatProvider ) : string
format string
formatProvider IFormatProvider
return string
        public string ToString(string format, IFormatProvider formatProvider)
        {
            if (format == null)
            {
                if (m_displayName != null && !String.IsNullOrEmpty(m_displayName.Text))
                {
                    return m_displayName.Text;
                }

                if (!QualifiedName.IsNull(m_browseName))
                {
                    return m_browseName.Name;
                }

                return Utils.Format("(unknown {0})", ((NodeClass)m_nodeClass).ToString().ToLower());
            }
        
            throw new FormatException(Utils.Format("Invalid format string: '{0}'.", format));
        }
        

Same methods

ReferenceDescription::ToString ( ) : string

Usage Example

 public PropertyWithHistory(ReferenceDescription reference, byte accessLevel)
 {
     DisplayText = reference.ToString();
     NodeId = (NodeId)reference.NodeId;
     BrowseName = reference.BrowseName;
     AccessLevel = accessLevel;
 }