|
|
![]() |
|
|
Top | #1 |
|
OSNN Addict
Joined: August 2005
Posts: 94
Reputation: 10
Power: 95 |
SQL has its own datatypes. But a small int in SQL translates to an Int16 in C#. But there is no such thing as Int8 in C#. So what is a tiny int in C#? |
|
|
|
|
|
Top | #2 |
|
OSNN Junior Addict
Joined: July 2009
Location: INDIA
Posts: 5
Reputation: 0
Power: 48 |
A TINYINT is an 8-bit integer value, a BIT field can store between 1 bit, BIT(1), and 64 bits, BIT(64). For a boolean values, BIT(1) is pretty common
|
|
|
|
|
|
Top | #3 |
|
*
Joined: December 2001
Location: USA
Posts: 6,497
Reputation: 2808
Power: 232 |
Originally Posted by Complete
In C# you can have a type named "byte" which is 8 bits wide:
Integral Types Table (C#) |
|
|
|
|
|
Top | #4 |
|
OSNN Junior Addict
Joined: April 2012
Location: Ahmedabad
Posts: 3
Reputation: 0
Power: 0 |
The .NET Framework type System.Int16 is a short in C#. If you just need 8 bits, you can use byte (System.Byte).
Thanks. Web Design |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|