question on technique in .net
From: C Williams (nospam_at_thank.you)
Date: 02/03/05
- Next message: Chip: "Exchange Out of Office Status"
- Previous message: jo0ls: "Re: Cannot refresh the textbox.text"
- Next in thread: public.microsoft.com: "Re: question on technique in .net"
- Reply: public.microsoft.com: "Re: question on technique in .net"
- Reply: Samuel R. Neff: "Re: question on technique in .net"
- Reply: Jay B. Harlow [MVP - Outlook]: "Re: question on technique in .net"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 03 Feb 2005 11:22:56 -0500
I find myself needing to loop through various collections in .NET a lot.
I am wondering if there is a generally accepted method for doing so.
I see three main ways (I'll use rows in a DataTable, which I am doing a
lot of work with)
1) For each curRow in curTable.Rows
2) For i = 0 to curTable.Rows.Count -1
currow = curtable.rows(i)
3) use curTable.Rows.GetEnumerator
Option 1 yields the shortest code, but which runs the fastest? I
suspect they are very similar, but I also suspect that someone out there
actually *knows*!
Thanks for any insights you have!
-Casey
- Next message: Chip: "Exchange Out of Office Status"
- Previous message: jo0ls: "Re: Cannot refresh the textbox.text"
- Next in thread: public.microsoft.com: "Re: question on technique in .net"
- Reply: public.microsoft.com: "Re: question on technique in .net"
- Reply: Samuel R. Neff: "Re: question on technique in .net"
- Reply: Jay B. Harlow [MVP - Outlook]: "Re: question on technique in .net"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|