Skip to main content

C# Tutorial , Step-5, Built in Data Types

 Hello, Welcome to all. My name is Abdul Yesdani. Today we are going to learn about built in data types of C# language.

The following list describe the C# built in types.


Integral numeric types

Type

Description / Range

bool

True or false

byte

0-255     Unsigned 8 bit integer

sbyte

-128 to 127       Signed 8 bit integer

short

-32,768 to 32,767         Signed 16-bit integer

ushort

0 to 65,535               Unsigned 16-bit integer

int

-2,147,483,648 to 2,147,483,647    Signed 32-bit integer

uint

0 to 4,294,967,295     Unsigned 32-bit integer

long

-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
Signed 64-bit integer

ulong

0 to 18,446,744,073,709,551,615
Unsigned 64-bit integer

Floating Types

float

±1.5 x 10−45 to ±3.4 x 1038             4 bytes

double

±5.0 × 10−324 to ±1.7 × 10308        8 bytes

decimal

±1.0 x 10-28 to ±7.9228 x 1028       16 bytes

Other Types

bool

Represents true or false

char

Represents a Unicode UTF-16 character.

String 

Reference a sequence of zero or more Unicode UTF-16 characters.


We can use any of above types as variable types in our program code as per need.

Example : float  price=67855.78

                  double rate_item = 4535566.89999

                   int num=8900

                   char  letter = 'T'

                  string person ="Noah"

-------------  *********************************************************-----------






Comments

Popular posts from this blog

.Net Presentation

.NET is a free, cross-platform, open source developer platform for building many different types of applications. With .NET, you can use multiple languages, editors, and libraries to build for web, mobile, desktop, games, and IoT. You can write .NET apps in C#, F#, or Visual Basic. C# is a simple, modern, object-oriented, and type-safe programming language. F# is a programming language that makes it easy to write succinct, robust, and performant code. Visual Basic is an approachable language with a simple syntax for building type-safe, object-oriented apps. You can write .NET apps in C#, F#, or Visual Basic. C# is a simple, modern, object-oriented, and type-safe programming language. F# is a programming language that makes it easy to write succinct, robust, and performant code. Visual Basic is an approachable language with a simple syntax for building type-safe, object-oriented apps.

Bootstrap

  Bootstrap is a powerful, feature-packed frontend toolkit. Build anything—from prototype to production. Bootstrap includes HTML and CSS based design templates for typography, forms, buttons, tables, navigation, modals, image carousels and many other, as well as optional JavaScript plugins Bootstrap also gives you the ability to easily create responsive designs. Get started by including Bootstrap’s production-ready CSS and JavaScript via CDN without the need for any build steps.