Click here to Skip to main content
15,902,114 members
Home / Discussions / C#
   

C#

 
QuestionNumericUpDown control increment value change Pin
Blubbo17-May-12 7:38
Blubbo17-May-12 7:38 
AnswerRe: NumericUpDown control increment value change Pin
OriginalGriff17-May-12 8:07
mveOriginalGriff17-May-12 8:07 
QuestionCannot Edit or Add Path to Reference File Pin
Xarzu17-May-12 6:47
Xarzu17-May-12 6:47 
AnswerRe: Cannot Edit or Add Path to Reference File Pin
Richard MacCutchan17-May-12 7:00
mveRichard MacCutchan17-May-12 7:00 
GeneralRe: Cannot Edit or Add Path to Reference File Pin
Xarzu17-May-12 7:31
Xarzu17-May-12 7:31 
AnswerRe: Cannot Edit or Add Path to Reference File Pin
Xarzu17-May-12 7:30
Xarzu17-May-12 7:30 
QuestionUser control as base class Pin
Ronny Portier17-May-12 4:50
Ronny Portier17-May-12 4:50 
AnswerRe: User control as base class Pin
BobJanova17-May-12 4:55
BobJanova17-May-12 4:55 
GeneralRe: User control as base class Pin
Ronny Portier17-May-12 5:27
Ronny Portier17-May-12 5:27 
AnswerRe: User control as base class Pin
RobCroll18-May-12 2:19
RobCroll18-May-12 2:19 
QuestionHow to read and insert files from Application directory in to Data base in C# Pin
ChandrakanthGaddam17-May-12 1:04
ChandrakanthGaddam17-May-12 1:04 
AnswerRe: How to read and insert files from Application directory in to Data base in C# Pin
Dave Kreskowiak17-May-12 2:13
mveDave Kreskowiak17-May-12 2:13 
AnswerRe: How to read and insert files from Application directory in to Data base in C# Pin
Luc Pattyn17-May-12 2:13
sitebuilderLuc Pattyn17-May-12 2:13 
QuestionDisposing GDI objects Pin
thalavi17-May-12 0:35
thalavi17-May-12 0:35 
AnswerRe: Disposing GDI objects Pin
Dave Kreskowiak17-May-12 2:10
mveDave Kreskowiak17-May-12 2:10 
AnswerRe: Disposing GDI objects Pin
Luc Pattyn17-May-12 2:11
sitebuilderLuc Pattyn17-May-12 2:11 
QuestionQuestion Related To Yesterdays Array of String..... Pin
glennPattonWork316-May-12 23:44
professionalglennPattonWork316-May-12 23:44 
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

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.