Tuesday, February 15, 2011

Cast SQL Money field type to C# Type

Given you have a field called customer_salary which is of type money in sql server, to cast and use it in your c# programs, you cast it to decimal.
Code:
decimal Price = Convert.ToDecimal(reader.GetValue(1)); 

0 comments:

Post a Comment