long

In this chapter you will learn:

  1. C# long type

long type

To specify a long type, use either the l or L suffix. For example

using System;/*from ja  va 2  s  .c  om*/

public class MainClass{
    public static void Main() {
        long lVal = 0x7FFFFFL;            // Long value specified as hex constant
        Console.WriteLine(lVal);

    }
}

Next chapter...

What you will learn in the next chapter:

  1. How to calculate with long value
Home » C# Tutorial » Byte, Integer, Long
Integer Family
Integer ranges
byte
Convert to byte
Parse string to byte
byte format
byte octal and hexadecimal
byte binary operation
byte overflow with unchecked
int
int value
Compare int value
int calculation
int value overflow
int binary operation
Parse string to int value
Format int value
int in binary, octal and hexadecimal
long
long value calculation
ulong