Login>>  Nick Pass

 Học tập : Web - eCommerce : ASP.NET
    Các kiểu dữ liệu cơ bản trong .NET
 

Bạn hãy click vào tên Diễn đàn con (phía trên) nếu muốn gửi Chủ đề mới
hoặc cuộn xuống cuối trang để trả lời cho Chủ đề này.


    
Tác giả Nội dung
daica
FITHOU_Staff

Ngày gia nhập:
21/07/2004 - 11:09:53
Số bài gửi: 537
Offline
Các kiểu dữ liệu cơ bản trong .NET
Ngày gửi : 09/08/2007 lúc 10:48:47 - Lượt xem: 2773

Quay về đầu        
chipchip
Normal_Member

Ngày gia nhập:
01/11/2004 - 02:11:04
Số bài gửi: 24
Offline
Ngày gửi : 01/11/2007 lúc 05:26:16

Table 1-1: Built-in Value Types

Type (Visual Basic/C# alias)

Bytes

Range

Use for

System.SByte (SByte/sbyte)

1

-128 to 127

Signed byte values

System.Byte (Byte/byte)

1

0 to 255

Unsigned bytes

System.Int16 (Short/short)

2

-32768 to 32767

Interoperation and other specialized uses

System.Int32 (Integer/int)

4

-2147483648 to 2147483647

Whole numbers and counters

System.UInt32 (UInteger/uint)

4

0 to 4294967295

Positive whole numbers and counters

System.Int64 (Long/long)

8

-9223372036854775808 to 9223372036854775807

Large whole numbers

System.Single (Single/float)

4

-3.402823E+38 to 3.402823E+38

Floating point numbers

System.Double (Double/double)

8

-1.79769313486232E+308 to 1.79769313486232E+308

Precise or large floating point numbers

System.Decimal (Decimal/decimal)

16

-79228162514264337593543950335 to 79228162514264337593543950335

Financial and scientific calculations requiring great precision

Table 1-2: Other Value Types

Type (Visual Basic/C# alias)

Bytes

Range

Use for

System.Char (Char/char)

2

N/A

Single Unicode characters

System.Boolean (Boolean/bool)

4

N/A

True/False values

System.IntPtr (none)

Platform-dependent

N/A

Pointer to a memory address

System.DateTime (Date/date)

8

1/1/0001 12:00:00 AM to 12/31/9999 11:59:59 PM

Moments in time


Table 1-3: Common Reference Types

Type

Use for

System.Object

The Object type is the most general type in the Framework. You can convert any type to System.Object, and you can rely o­n any type having ToString, GetType, and Equals members inherited from this type.

System.String

Text data.

System.Text.StringBuilder

Dynamic text data.

System.Array

Arrays of data. This is the base class for all arrays. Array declarations use language-specific array syntax.

System.IO.Stream

Buffer for file, device, and network I/O. This is an abstract base class; task-specific classes are derived from Stream.

System.Exception

Handling system and application-defined exceptions. Task-specific exceptions inherit from this type.

Table 1-5: Common Stream Types

System.IO Type

Use to

FileStream

Create a base stream used to write to or read from a file

MemoryStream

Create a base stream used to write to or read from memory

StreamReader

Read data from the stream

StreamWriter

Write data to the stream

Quay về đầu       

 

 

 

| Quay về đầu trang |  





© 2004 Trung tâm Công nghệ đào tạo trực tuyến - Khoa Công nghệ Tin học - Đại học Mở Hà Nội