Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / C#

short: practical reference

short: practical reference: short is the 16-bit signed System.Int16 type.

Version: C# built-in type reference; .NET 10 runtime

Syntax

short value

short is the 16-bit signed System.Int16 type.

Use it in formats and interop fields that are exactly 16 bits wide.

Arithmetic promotes it to int, and frequent casts can hide overflow.

Its range is -32768 through 32767, and negating MinValue does not fit in short.

The complete program actually uses short; its exact expected stdout is System.Int16.

Examples

using System;

Console.WriteLine(typeof(short).FullName);

Result

System.Int16

The complete program actually uses `short`; its exact expected stdout is `System.Int16`.

Sources