Click here to Skip to main content
15,913,610 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Can't update file/database running ASP.NET under IIS Pin
Petr Pechovic26-Nov-09 11:19
professionalPetr Pechovic26-Nov-09 11:19 
GeneralRe: Can't update file/database running ASP.NET under IIS Pin
vlehotay26-Nov-09 15:29
vlehotay26-Nov-09 15:29 
GeneralRe: Can't update file/database running ASP.NET under IIS [modified] Pin
Petr Pechovic26-Nov-09 22:11
professionalPetr Pechovic26-Nov-09 22:11 
QuestionConverting a DataTable Column to an Array? Pin
James Shao26-Nov-09 5:10
James Shao26-Nov-09 5:10 
AnswerRe: Converting a DataTable Column to an Array? Pin
dan!sh 26-Nov-09 5:22
professional dan!sh 26-Nov-09 5:22 
AnswerRe: Converting a DataTable Column to an Array? Pin
Covean26-Nov-09 5:30
Covean26-Nov-09 5:30 
AnswerRe: Converting a DataTable Column to an Array? Pin
Kannan Ar26-Nov-09 5:30
professionalKannan Ar26-Nov-09 5:30 
AnswerRe: Converting a DataTable Column to an Array? Pin
Abhishek Sur26-Nov-09 8:18
professionalAbhishek Sur26-Nov-09 8:18 
First of all why dont you use List.... as your collection. It is always better to use ArrayList or Generic List as collection rather than going for Array.

Next, I always prefer to use ForEach rather than For when I am looping through an Enumerable.

If I was in your situation I would write this as :

Private Function DataTableToArray(ByVal x As DataTable, ByVal intCol As Integer) As List(Of Double)
    Dim lst As New List(Of Double)

    For Each dr As DataRow In x.Rows
        lst.Add(dr.Item(intCol))
    Next

    Return lst
End Function


Or if you still want to use Array you might use List(Of Double).ToArray as well.
Cheers.
Rose | [Rose]

Abhishek Sur
Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->

Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using Javascript

AnswerRe: Converting a DataTable Column to an Array? Pin
James Shao26-Nov-09 14:38
James Shao26-Nov-09 14:38 
AnswerRe: Converting a DataTable Column to an Array? Pin
carlecomm26-Nov-09 23:28
carlecomm26-Nov-09 23:28 
AnswerRe: Converting a DataTable Column to an Array? Pin
James Shao28-Nov-09 18:07
James Shao28-Nov-09 18:07 
QuestionIncorrect Auto Size of DIV Tags when size of contents are dynamically changed. Pin
Mehdi Ghiasi26-Nov-09 4:11
Mehdi Ghiasi26-Nov-09 4:11 
AnswerRe: Incorrect Auto Size of DIV Tags when size of contents are dynamically changed. Pin
Abhishek Sur26-Nov-09 4:36
professionalAbhishek Sur26-Nov-09 4:36 
GeneralRe: Incorrect Auto Size of DIV Tags when size of contents are dynamically changed. Pin
Mehdi Ghiasi26-Nov-09 20:09
Mehdi Ghiasi26-Nov-09 20:09 
GeneralRe: Incorrect Auto Size of DIV Tags when size of contents are dynamically changed. Pin
Abhishek Sur26-Nov-09 22:15
professionalAbhishek Sur26-Nov-09 22:15 
QuestionUser.Identity.Name is empty Pin
rljurado26-Nov-09 3:50
rljurado26-Nov-09 3:50 
AnswerRe: User.Identity.Name is empty Pin
Abhijit Jana26-Nov-09 3:51
professionalAbhijit Jana26-Nov-09 3:51 
GeneralRe: User.Identity.Name is empty Pin
rljurado26-Nov-09 3:55
rljurado26-Nov-09 3:55 
GeneralRe: User.Identity.Name is empty Pin
Abhijit Jana26-Nov-09 4:00
professionalAbhijit Jana26-Nov-09 4:00 
GeneralRe: Why ? Pin
Abhijit Jana26-Nov-09 6:35
professionalAbhijit Jana26-Nov-09 6:35 
GeneralRe: Why ? Pin
Abhishek Sur26-Nov-09 7:07
professionalAbhishek Sur26-Nov-09 7:07 
GeneralRe: Why ? Pin
sashidhar26-Nov-09 7:22
sashidhar26-Nov-09 7:22 
GeneralRe: User.Identity.Name is empty Pin
sashidhar26-Nov-09 4:00
sashidhar26-Nov-09 4:00 
GeneralRe: User.Identity.Name is empty Pin
Abhijit Jana26-Nov-09 4:06
professionalAbhijit Jana26-Nov-09 4:06 
GeneralRe: User.Identity.Name is empty Pin
sashidhar26-Nov-09 4:50
sashidhar26-Nov-09 4:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.