Asim Sajjad
Asim Sajjad

Reputation: 2534

uniqueidentifier Equivalent DataType In C#

what is uniqueidentifier (Sql server 2005) equivalent in C# 3.5 datatype ?

Upvotes: 19

Views: 27604

Answers (3)

EffectiveLongJumper
EffectiveLongJumper

Reputation: 13

Use System.Guid

Example :

    public string CustID { get; set; }

    public System.Guid ActivationCode { get; set;}

Upvotes: 1

Jehof
Jehof

Reputation: 35544

It should be System.Guid or Nullable<Guid>

Upvotes: 27

KhanS
KhanS

Reputation: 1195

System.Guid.NewGuid()

Upvotes: 1

Related Questions