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