Int16 Structure
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Represents a 16-bit signed integer.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
<SerializableAttribute> _
Public Structure Int16
[SerializableAttribute]
public struct Int16
[SerializableAttribute]
public value class Int16
[<Sealed>]
[<SerializableAttribute>]
type Int16 = struct end
JScript supports the use of structures, but not the declaration of new ones.
The Int16 type exposes the following members.
Methods
Name | Description | |
---|---|---|
Equals | Indicates whether this instance and a specified object are equal. (Inherited from ValueType.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Parse | Converts the string representation of a number to its 16-bit signed integer equivalent. | |
ToString() () () () | Converts the numeric value of this instance to its equivalent string representation. (Overrides Object. . :: . .ToString() () () ().) | |
ToString(String) | Converts the numeric value of this instance to its equivalent string representation, using the specified format. |
Top
Fields
Name | Description | |
---|---|---|
MaxValue | Represents the largest possible value of an Int16. This field is constant. | |
MinValue | Represents the smallest possible value of Int16. This field is constant. |
Top
Remarks
The Int16 value type represents signed integers with values ranging from negative 32768 through positive 32767.
This type provides methods to convert the value of an instance of this type to its string representation, convert the string representation of a number to an instance of this type, and compare instances of this type.
Thread Safety
All members of this type are thread safe. Members that appear to modify instance state actually return a new instance initialized with the new value. As with any other type, reading and writing to a shared variable that contains an instance of this type must be protected by a lock to guarantee thread safety.