/// <summary> /// Initializes a new instance of the UInt16Value class by deep copying the supplied UInt16Value class. /// </summary> /// <param name="source">The source UInt16Value class.</param> public UInt16Value(UInt16Value source) : base(source) { if (source == null) { throw new ArgumentNullException(nameof(source)); } }
/// <summary> /// Returns the UInt16 representation of a UInt16Value object. /// </summary> /// <param name="xmlAttribute"> /// A UInt16Value object to retrieve a UInt16 representation. /// </param> /// <returns>A UInt16 value that represents a UInt16Value object.</returns> public static ushort ToUInt16(UInt16Value xmlAttribute) { if (xmlAttribute == null) { throw new InvalidOperationException(ExceptionMessages.ImplicitConversionExceptionOnNull); } return(xmlAttribute.Value); }
/// <summary> /// Returns the <see cref="ushort"/> representation of a <see cref="UInt16Value"/> object. /// </summary> /// <param name="value"> /// A <see cref="UInt16Value"/> object to retrieve a <see cref="ushort"/> representation. /// </param> /// <returns>A <see cref="ushort"/> value that represents a <see cref="UInt16Value"/> object.</returns> public static ushort ToUInt16(UInt16Value value) { if (value is null) { throw new InvalidOperationException(ExceptionMessages.ImplicitConversionExceptionOnNull); } return(value.Value); }
/// <summary> /// Initializes a new instance of the UInt16Value class by deep copying the supplied UInt16Value class. /// </summary> /// <param name="source">The source UInt16Value class.</param> public UInt16Value(UInt16Value source) : base(source) { }