Click here to Skip to main content
15,887,446 members
Home / Discussions / C#
   

C#

 
QuestionClipboard copy and a listview Pin
Piet Pelle9-Aug-07 9:31
Piet Pelle9-Aug-07 9:31 
AnswerRe: Clipboard copy and a listview Pin
Judah Gabriel Himango9-Aug-07 9:43
sponsorJudah Gabriel Himango9-Aug-07 9:43 
GeneralRe: Clipboard copy and a listview Pin
Piet Pelle9-Aug-07 9:54
Piet Pelle9-Aug-07 9:54 
GeneralRe: Clipboard copy and a listview Pin
Judah Gabriel Himango9-Aug-07 9:57
sponsorJudah Gabriel Himango9-Aug-07 9:57 
GeneralRe: Clipboard copy and a listview Pin
Piet Pelle9-Aug-07 10:14
Piet Pelle9-Aug-07 10:14 
GeneralRe: Clipboard copy and a listview Pin
Piet Pelle9-Aug-07 10:33
Piet Pelle9-Aug-07 10:33 
GeneralRe: Clipboard copy and a listview Pin
Judah Gabriel Himango9-Aug-07 10:43
sponsorJudah Gabriel Himango9-Aug-07 10:43 
GeneralRe: Clipboard copy and a listview [modified] Pin
Luc Pattyn9-Aug-07 10:53
sitebuilderLuc Pattyn9-Aug-07 10:53 
Actually it all depends on the cost of the termination test in the for loop;
that test gets executed for each iteration, if it entails a method or property lookup,
even when we know the result is or should be constant, it does not get optimized
and moved outside the loop, so it is executed over and over.

The biggest performance mistake in image processing is writing
for (int i=0; i<bitmap.Width; i++) for (int j=0; j<bitmap.Height; j++) ...
since that will probably spend more time interrogating the bitmap's boundaries
size than it does dealing with the actual pixels.

Another big victim is RichTextBox when looping over the text, testing for Text.Length,
which would recalculate the text over and over (and that's why I guess they also offer RichTextBox.TextLength).

Smile | :)

-- modified at 17:50 Thursday 9th August, 2007 (patched the less-than sign)


Luc Pattyn [Forum Guidelines] [My Articles]


this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google


GeneralRe: Clipboard copy and a listview Pin
Judah Gabriel Himango9-Aug-07 11:52
sponsorJudah Gabriel Himango9-Aug-07 11:52 
GeneralRe: Clipboard copy and a listview Pin
Luc Pattyn9-Aug-07 12:03
sitebuilderLuc Pattyn9-Aug-07 12:03 
GeneralRe: Clipboard copy and a listview Pin
Judah Gabriel Himango9-Aug-07 12:55
sponsorJudah Gabriel Himango9-Aug-07 12:55 
GeneralRe: Clipboard copy and a listview Pin
Luc Pattyn9-Aug-07 13:05
sitebuilderLuc Pattyn9-Aug-07 13:05 
GeneralRe: Clipboard copy and a listview Pin
Piet Pelle9-Aug-07 10:55
Piet Pelle9-Aug-07 10:55 
Questionwhat is a C# reference type Pin
misha_grewal9-Aug-07 7:33
misha_grewal9-Aug-07 7:33 
AnswerRe: what is a C# reference type Pin
led mike9-Aug-07 8:10
led mike9-Aug-07 8:10 
AnswerRe: what is a C# reference type Pin
Guffa9-Aug-07 9:07
Guffa9-Aug-07 9:07 
QuestiontextBox1.Visible=false NOT work&#65281; Pin
liubin_aluzi9-Aug-07 7:32
liubin_aluzi9-Aug-07 7:32 
AnswerRe: textBox1.Visible=false NOT work&#65281; Pin
PhilDanger9-Aug-07 8:21
PhilDanger9-Aug-07 8:21 
AnswerRe: textBox1.Visible=false NOT work&#65281; Pin
Martin#9-Aug-07 20:01
Martin#9-Aug-07 20:01 
QuestionGDI+ Printing using C# - Please help Pin
krishna44569-Aug-07 7:22
professionalkrishna44569-Aug-07 7:22 
AnswerRe: GDI+ Printing using C# - Please help Pin
Judah Gabriel Himango9-Aug-07 9:52
sponsorJudah Gabriel Himango9-Aug-07 9:52 
GeneralRe: GDI+ Printing using C# - Please help Pin
krishna44569-Aug-07 11:01
professionalkrishna44569-Aug-07 11:01 
QuestionCrystalReportViewer and export document Pin
Saamir9-Aug-07 5:43
Saamir9-Aug-07 5:43 
AnswerRe: CrystalReportViewer and export document Pin
Tom1019-Aug-07 6:09
Tom1019-Aug-07 6:09 
GeneralRe: CrystalReportViewer and export document Pin
Saamir9-Aug-07 6:44
Saamir9-Aug-07 6:44 

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.