Enums in C# - use sbyte

August 14th, 2008 Posted in C#

C# Code Specification:

The following example declares an enum type named Alignment with an underlying type of sbyte.

enum Alignment: sbyte
{
Left = -1,
Center = 0,
Right = 1
}

When you use enumerations in C# - you easy can declare new values as sbyte. Standart type of variable is int, but you can use and sbyte type.

Leave a Reply

You must be logged in to post a comment.