Opc.Ua.StatusCodes.GetBrowseName C# (CSharp) Method

GetBrowseName() public static method

Returns the browse name for the attribute.
public static GetBrowseName ( uint identifier ) : string
identifier uint
return string
        public static string GetBrowseName(uint identifier)
		{
			FieldInfo[] fields = typeof(StatusCodes).GetFields(BindingFlags.Public | BindingFlags.Static);

			foreach (FieldInfo field in fields)
			{
                if (identifier == (uint)field.GetValue(typeof(StatusCodes)))
				{
					return field.Name;
				}
			}

			return System.String.Empty;
		}

Usage Example

コード例 #1
0
        /// <summary>
        /// Returns the string representation of the object.
        /// </summary>
        public string ToString(string format, IFormatProvider provider)
        {
            if (format == null)
            {
                return(String.Format(provider, "{0}", StatusCodes.GetBrowseName((0xFFFF0000 & ToCode(this)))));
            }

            throw new FormatException(String.Format("Invalid format string: '{0}'.", format));
        }
All Usage Examples Of Opc.Ua.StatusCodes::GetBrowseName