C# Driver 1.0 for Apache Cassandra

CQL3 data types to C# types

A summary of the mapping between CQL3 data types and C# data types is provided.

Description

When retrieving the value of a column from a Row object, you use a getter based on the type of the column.

Table 1. C# classes to CQL3 data types
CQL3 data type C# type
ascii Encoding.ASCII string
bigint long
blob byte[]
boolean bool
counter long
custom Encoding.UTF8 string
decimal float
double double
float float
inet IPEndPoint
int int
list IEnumerable<T>
map IEnumerableDictionary<K, V>
set IEnumerable<T>
text Encoding.UTF8 string
timestamp System.DateTimeOffset
timeuuid System.Guid
uuid System.Guid
varchar Encoding.UTF8 string
varint System.Numerics.BigInteger (.NET 4.0), byte[] (.NET 3.5)