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.
Type (Visual Basic/C# alias)
Bytes
Range
Use for
System.SByte (SByte/sbyte)
1
-128 to 127
Signed byte values
System.Byte (Byte/byte)
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)
0 to 4294967295
Positive whole numbers and counters
System.Int64 (Long/long)
8
-9223372036854775808 to 9223372036854775807
Large whole numbers
System.Single (Single/float)
-3.402823E+38 to 3.402823E+38
Floating point numbers
System.Double (Double/double)
-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
System.Char (Char/char)
N/A
Single Unicode characters
System.Boolean (Boolean/bool)
True/False values
System.IntPtr (none)
Platform-dependent
Pointer to a memory address
System.DateTime (Date/date)
1/1/0001 12:00:00 AM to 12/31/9999 11:59:59 PM
Moments in time
Type
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 on 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.
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