Click here to Skip to main content
15,888,527 members
Home / Discussions / C#
   

C#

 
AnswerRe: Question Related To Yesterdays Array of String..... Pin
BobJanova16-May-12 23:59
BobJanova16-May-12 23:59 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
glennPattonWork317-May-12 0:13
professionalglennPattonWork317-May-12 0:13 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
BobJanova17-May-12 4:52
BobJanova17-May-12 4:52 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
glennPattonWork317-May-12 5:37
professionalglennPattonWork317-May-12 5:37 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
glennPattonWork317-May-12 1:05
professionalglennPattonWork317-May-12 1:05 
AnswerRe: Question Related To Yesterdays Array of String..... Pin
Luc Pattyn17-May-12 2:17
sitebuilderLuc Pattyn17-May-12 2:17 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
glennPattonWork317-May-12 2:28
professionalglennPattonWork317-May-12 2:28 
AnswerRe: Question Related To Yesterdays Array of String..... Pin
Luc Pattyn17-May-12 2:59
sitebuilderLuc Pattyn17-May-12 2:59 
Hmm. That code isn't sorting anything, all I see is a chronological concatenation, and the elimination of multiples.

For maximum performance:
- I would NOT concatenate strings, and hence I would not use a TextBox or RichTextBox; I prefer a ListBox, it is a line-oriented control that never needs any implicit concatenation of strings;
- I would not rely on LINQ;
- I would not get a Count property more than once (you get it on every iteration of the loop);
- I would use a foreach, not a for loop;
- I would not work on string data (as in RTB content) unless the data really is text; the actual type (int, DateTime, whatever your data is) is always the preferred one for all operations other than human input/output.
- I would prevent multiples from entering the collection, rather than removing them afterwards;
- when needing a sorted result, I would consider using a collection that sorts all by itself (depends on circumstances, may be faster or slower).
- however I would not worry a bit if Count is below say 100.

Smile | :)
Luc Pattyn [My Articles] Nil Volentibus Arduum

GeneralRe: Question Related To Yesterdays Array of String..... Pin
glennPattonWork317-May-12 3:12
professionalglennPattonWork317-May-12 3:12 
AnswerRe: Question Related To Yesterdays Array of String..... Pin
Luc Pattyn17-May-12 3:27
sitebuilderLuc Pattyn17-May-12 3:27 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
glennPattonWork317-May-12 3:30
professionalglennPattonWork317-May-12 3:30 
AnswerRe: Question Related To Yesterdays Array of String..... Pin
Luc Pattyn17-May-12 3:35
sitebuilderLuc Pattyn17-May-12 3:35 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
glennPattonWork317-May-12 3:39
professionalglennPattonWork317-May-12 3:39 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
BobJanova17-May-12 4:53
BobJanova17-May-12 4:53 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
Luc Pattyn17-May-12 4:56
sitebuilderLuc Pattyn17-May-12 4:56 
AnswerRe: Question Related To Yesterdays Array of String..... Pin
PIEBALDconsult17-May-12 3:19
mvePIEBALDconsult17-May-12 3:19 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
glennPattonWork317-May-12 3:26
professionalglennPattonWork317-May-12 3:26 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
PIEBALDconsult17-May-12 3:33
mvePIEBALDconsult17-May-12 3:33 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
glennPattonWork317-May-12 3:41
professionalglennPattonWork317-May-12 3:41 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
PIEBALDconsult17-May-12 3:46
mvePIEBALDconsult17-May-12 3:46 
GeneralRe: Question Related To Yesterdays Array of String..... Pin
glennPattonWork317-May-12 3:51
professionalglennPattonWork317-May-12 3:51 
QuestionSQL Server 2005 Pin
hunain.esh16-May-12 20:50
hunain.esh16-May-12 20:50 
AnswerRe: SQL Server 2005 Pin
Dave Kreskowiak17-May-12 2:07
mveDave Kreskowiak17-May-12 2:07 
GeneralRe: SQL Server 2005 Pin
hunain.esh17-May-12 19:34
hunain.esh17-May-12 19:34 
QuestionSybase DB access in windows 7 Pin
VenkataRamana.Gali16-May-12 18:14
VenkataRamana.Gali16-May-12 18:14 

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.