December 21, 2009
Collapsible ListViewGroup
Making the ListViewGroup Collaps is not that hard. I've made an simple article on CodeProject.com. check it out here
Etiketter:
CodeProject.com,
Collaps,
Link,
ListViewGroup
December 9, 2009
CLR Datatype Mapping tables
SQL CLR Data type mapping
Source: http://msdn.microsoft.com/en-us/library/ms131092.aspx
Image Source: http://msdn.microsoft.com/en-us/library/bb386947.aspx
Platform Invoke Data Types
Source: http://msdn.microsoft.com/en-us/library/aa720411(VS.71).aspx
Multiple Data Types Mapping Table
Source: http://msdn.microsoft.com/en-us/library/aa720713(VS.71).aspx
SQL Server data type | CLR data type (SQL Server) | CLR data type (.NET Framework) |
---|---|---|
bigint | SqlInt64 | Int64, Nullable<Int64> |
binary | SqlBytes, SqlBinary | Byte[] |
bit | SqlBoolean | Boolean, Nullable<Boolean> |
char | None | None |
cursor | None | None |
date | SqlDateTime | DateTime, Nullable<DateTime> |
datetime | SqlDateTime | DateTime, Nullable<DateTime> |
datetime2 | SqlDateTime | DateTime, Nullable<DateTime> |
DATETIMEOFFSET | None | DateTimeOffset, Nullable<DateTimeOffset> |
decimal | SqlDecimal | Decimal, Nullable<Decimal> |
float | SqlDouble | Double, Nullable<Double> |
geography | SqlGeography defined in Microsoft.SqlServer.Types.dll Download here:feature pack. | None |
geometry | SqlGeometry defined in Microsoft.SqlServer.Types.dll Download here: feature pack. | None |
hierarchyid | SqlHierarchyId defined in Microsoft.SqlServer.Types.dll Download here: feature pack. | None |
image | None | None |
int | SqlInt32 | Int32, Nullable<Int32> |
money | SqlMoney | Decimal, Nullable<Decimal> |
nchar | SqlChars, SqlString | String, Char[] |
ntext | None | None |
numeric | SqlDecimal | Decimal, Nullable<Decimal> |
nvarchar | SqlChars, SqlString SQLChars is a better match for data transfer and access, and SQLString is a better match for performing String operations. | String, Char[] |
nvarchar(1), nchar(1) | SqlChars, SqlString | Char, String, Char[], Nullable<char> |
real | SqlSingle | Single, Nullable<Single> |
rowversion | None | Byte[] |
smallint | SqlInt16 | Int16, Nullable<Int16> |
smallmoney | SqlMoney | Decimal, Nullable<Decimal> |
sql_variant | None | Object |
table | None | None |
text | None | None |
time | TimeSpan | TimeSpan, Nullable<TimeSpan> |
timestamp | None | None |
tinyint | SqlByte | Byte, Nullable<Byte> |
uniqueidentifier | SqlGuid | Guid, Nullable<Guid> |
User-defined type(UDT) | None | The same class that is bound to the user-defined type in the same assembly or a dependent assembly. |
varbinary | SqlBytes, SqlBinary | Byte[] |
varbinary(1), binary(1) | SqlBytes, SqlBinary | byte, Byte[], Nullable<byte> |
varchar | None | None |
xml | SqlXml | None |
Image Source: http://msdn.microsoft.com/en-us/library/bb386947.aspx
Platform Invoke Data Types
Unmanaged type in Wtypes.h | Unmanaged C language type | Managed class name | Description |
---|---|---|---|
HANDLE | void* | System.IntPtr | 32 bits |
BYTE | unsigned char | System.Byte | 8 bits |
SHORT | short | System.Int16 | 16 bits |
WORD | unsigned short | System.UInt16 | 16 bits |
INT | int | System.Int32 | 32 bits |
UINT | unsigned int | System.UInt32 | 32 bits |
LONG | long | System.Int32 | 32 bits |
BOOL | long | System.Int32 | 32 bits |
DWORD | unsigned long | System.UInt32 | 32 bits |
ULONG | unsigned long | System.UInt32 | 32 bits |
CHAR | char | System.Char | Decorate with ANSI. |
LPSTR | char* | System.String or System.StringBuilder | Decorate with ANSI. |
LPCSTR | Const char* | System.String or System.StringBuilder | Decorate with ANSI. |
LPWSTR | wchar_t* | System.String or System.StringBuilder | Decorate with Unicode. |
LPCWSTR | Const wchar_t* | System.String or System.StringBuilder | Decorate with Unicode. |
FLOAT | Float | System.Single | 32 bits |
DOUBLE | Double | System.Double | 64 bits |
Source: http://msdn.microsoft.com/en-us/library/aa720411(VS.71).aspx
Multiple Data Types Mapping Table
Category | Class name | Description | Visual Basic data type | C# data type | Managed Extensions for C++ data type | JScript data type |
---|---|---|---|---|---|---|
Integer | Byte | An 8-bit unsigned integer. | Byte | byte | char | Byte |
SByte | An 8-bit signed integer.Not CLS-compliant. | SByte No built-in type. | sbyte | signed char | SByte | |
Int16 | A 16-bit signed integer. | Short | short | short | short | |
Int32 | A 32-bit signed integer. | Integer | int | int -or- long | int | |
Int64 | A 64-bit signed integer. | Long | long | __int64 | long | |
UInt16 | A 16-bit unsigned integer.Not CLS-compliant. | UInt16 No built-in type. | ushort | unsigned short | UInt16 | |
UInt32 | A 32-bit unsigned integer.Not CLS-compliant. | UInt32 No built-in type. | uint | unsigned int -or- unsigned long | UInt32 | |
UInt64 | A 64-bit unsigned integer.Not CLS-compliant. | UInt64 No built-in type. | ulong | unsigned __int64 | UInt64 | |
Floating point | Single | A single-precision (32-bit) floating-point number. | Single | float | float | float |
Double | A double-precision (64-bit) floating-point number. | Double | double | double | double | |
Logical | Boolean | A Boolean value (true or false). | Boolean | bool | bool | bool |
Other | Char | A Unicode (16-bit) character. | Char | char | wchar_t | char |
Decimal | A 96-bit decimal value. | Decimal | decimal | Decimal | Decimal | |
IntPtr | A signed integer whose size depends on the underlying platform (a 32-bit value on a 32-bit platform and a 64-bit value on a 64-bit platform). | IntPtr No built-in type. | IntPtr No built-in type. | IntPtr No built-in type. | IntPtr | |
UIntPtr | An unsigned integer whose size depends on the underlying platform (a 32- bit value on a 32-bit platform and a 64-bit value on a 64-bit platform).Not CLS-compliant. | UIntPtr No built-in type. | UIntPtr No built-in type. | UIntPtr No built-in type. | UIntPtr | |
Class objects | Object | The root of the object hierarchy. | Object | object | Object* | Object |
String | An immutable, fixed-length string of Unicode characters. | String | string | String* | String |
Source: http://msdn.microsoft.com/en-us/library/aa720713(VS.71).aspx
Etiketter:
C#,
C++,
CLR,
Datatype,
Framework 4.0,
JScript,
Managed types,
Mapping,
Pinvoke,
SQL,
SQL2005,
SQL2008,
SQL2008R2,
SQL2012,
Unmanaged types,
VB.Net,
Visual Basic
December 8, 2009
CLR Data Types and more
Built-in Types Table
Source: http://msdn.microsoft.com/en-us/library/aa287910(VS.71).aspx
Range and Size
Source: http://msdn.microsoft.com/en-us/library/exx3b86w(VS.71).aspx and http://msdn.microsoft.com/en-us/library/9ahet949(VS.71).aspx
Default values
Source: http://msdn.microsoft.com/en-us/library/83fhsxwc(VS.71).aspx
Implicit Numeric Conversions Table
Source: http://msdn.microsoft.com/en-us/library/y5b434w4(VS.71).aspx
Explicit Numeric Conversions Table
Source: http://msdn.microsoft.com/en-us/library/aa288039(VS.71).aspx
C# Type | .NET Framework type |
---|---|
bool | System.Boolean |
byte | System.Byte |
sbyte | System.SByte |
char | System.Char |
decimal | System.Decimal |
double | System.Double |
float | System.Single |
int | System.Int32 |
uint | System.UInt32 |
long | System.Int64 |
ulong | System.UInt64 |
object | System.Object |
short | System.Int16 |
ushort | System.UInt16 |
string | System.String |
Range and Size
Type | Range | Size |
---|---|---|
bool | true or false (1 or 0) | 1 bit |
sbyte | -128 to 127 | Signed 8-bit integer |
byte | 0 to 255 | Unsigned 8-bit integer |
char | U+0000 to U+ffff | Unicode 16-bit character |
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 |
Type | Approximate range | Precision |
float | ±1.5 × 10−45 to ±3.4 × 1038 | 7 digits |
double | ±5.0 × 10−324 to ±1.7 × 10308 | 15-16 digits |
Default values
Value type | Default value |
---|---|
bool | false |
byte | 0 |
char | '\0' |
decimal | 0.0M |
double | 0.0D |
enum | The value produced by the expression (E)0, where E is the enum identifier. |
float | 0.0F |
int | 0 |
long | 0L |
sbyte | 0 |
short | 0 |
struct | The value produced by setting all value-type fields to their default values and all reference-type fields to null. |
uint | 0 |
ulong | 0 |
ushort | 0 |
Implicit Numeric Conversions Table
From | To |
---|---|
sbyte | short, int, long, float, double, or decimal |
byte | short, ushort, int, uint, long, ulong, float, double, or decimal |
short | int, long, float, double, or decimal |
ushort | int, uint, long, ulong, float, double, or decimal |
int | long, float, double, or decimal |
uint | long, ulong, float, double, or decimal |
long | float, double, or decimal |
char | ushort, int, uint, long, ulong, float, double, or decimal |
float | double |
ulong | float, double, or decimal |
Explicit Numeric Conversions Table
From | To |
---|---|
sbyte | byte, ushort, uint, ulong, or char |
byte | sbyte or char |
short | sbyte, byte, ushort, uint, ulong, or char |
ushort | sbyte, byte, short, or char |
int | sbyte, byte, short, ushort, uint, ulong, or char |
uint | sbyte, byte, short, ushort, int, or char |
long | sbyte, byte, short, ushort, int, uint, ulong, or char |
ulong | sbyte, byte, short, ushort, int, uint, long, or char |
char | sbyte, byte, or short |
float | sbyte, byte, short, ushort, int, uint, long, ulong, char, or decimal |
double | sbyte, byte, short, ushort, int, uint, long, ulong, char, float, or decimal |
decimal | sbyte, byte, short, ushort, int, uint, long, ulong, char, float, or double |
Subscribe to:
Posts (Atom)