Decrease Font Size
Increase Font Size
   BLOG

Linq convert double to string

by bryian 21. October 2009 19:33

Linq converting double to string


I'm new to Linq. I was working on one of the application and have to convert type double to string. I did some research on Goggle but can't find any good example. If you are looking for a sample code on how to convert double to string in Linq, please see below.

NumberFormatInfo provider = new NumberFormatInfo();

var listItems = from i in db.SomeTable
                   select Convert.ToString(i.colDouble, provider);

Add comment


(Will show your Gravatar icon)

  Country flag

Click to change captcha
biuquote
  • Comment
  • Preview
Loading