Click here to Skip to main content
15,917,473 members
Home / Discussions / C#
   

C#

 
GeneralRe: Autocomplete/intellisence in a multiline edit box Pin
djkno321-Apr-05 10:08
djkno321-Apr-05 10:08 
GeneralWindows Forms - Programmatically scroll a listview control to the selected item Pin
abcxyz8220-Apr-05 2:15
abcxyz8220-Apr-05 2:15 
GeneralRe: Windows Forms - Programmatically scroll a listview control to the selected item Pin
Dave Kreskowiak20-Apr-05 5:56
mveDave Kreskowiak20-Apr-05 5:56 
QuestionHow to extract the sql query from a report Pin
Ana-Gabriela Clem20-Apr-05 1:52
Ana-Gabriela Clem20-Apr-05 1:52 
Questionlocal method variable or global class ? Pin
CiNN20-Apr-05 1:25
CiNN20-Apr-05 1:25 
AnswerRe: local method variable or global class ? Pin
Enishi20-Apr-05 1:37
Enishi20-Apr-05 1:37 
GeneralRe: local method variable or global class ? Pin
CiNN20-Apr-05 2:02
CiNN20-Apr-05 2:02 
AnswerRe: local method variable or global class ? Pin
S. Senthil Kumar20-Apr-05 2:09
S. Senthil Kumar20-Apr-05 2:09 
It would be more efficient to allocate in the constructor. You are anyway going to use it everytime a paint occurs, you might as well cache it. And because Brush and Graphics handles will have unmanaged resources, it would be more efficient to get them once and hold on to them rather than acquiring and releasing them every time.

That said, the .NET GC is very good at cleaning up objects that are destroyed soon after creation, so you might want to measure it up using a profiler.

Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
GeneralRe: local method variable or global class ? Pin
Sebastian Schneider20-Apr-05 3:50
Sebastian Schneider20-Apr-05 3:50 
GeneralRe: local method variable or global class ? Pin
S. Senthil Kumar20-Apr-05 4:33
S. Senthil Kumar20-Apr-05 4:33 
GeneralRe: local method variable or global class ? Pin
Dave Kreskowiak20-Apr-05 5:52
mveDave Kreskowiak20-Apr-05 5:52 
GeneralRe: local method variable or global class ? Pin
S. Senthil Kumar20-Apr-05 6:04
S. Senthil Kumar20-Apr-05 6:04 
GeneralRe: local method variable or global class ? Pin
Dave Kreskowiak20-Apr-05 14:25
mveDave Kreskowiak20-Apr-05 14:25 
GeneralRe: local method variable or global class ? Pin
S. Senthil Kumar20-Apr-05 19:07
S. Senthil Kumar20-Apr-05 19:07 
GeneralRe: local method variable or global class ? Pin
Dave Kreskowiak21-Apr-05 2:19
mveDave Kreskowiak21-Apr-05 2:19 
GeneralRe: local method variable or global class ? Pin
S. Senthil Kumar21-Apr-05 4:59
S. Senthil Kumar21-Apr-05 4:59 
GeneralRe: local method variable or global class ? Pin
Dave Kreskowiak21-Apr-05 12:06
mveDave Kreskowiak21-Apr-05 12:06 
Generalaudio recording Pin
_g00fy_20-Apr-05 1:18
suss_g00fy_20-Apr-05 1:18 
GeneralWindows Services in Foreground Pin
Enishi20-Apr-05 1:18
Enishi20-Apr-05 1:18 
GeneralReports in C# Pin
Ana-Gabriela Clem19-Apr-05 23:20
Ana-Gabriela Clem19-Apr-05 23:20 
Generalpermissions help! Pin
Anthony Mushrow19-Apr-05 23:14
professionalAnthony Mushrow19-Apr-05 23:14 
GeneralRe: permissions help! Pin
Dave Kreskowiak20-Apr-05 5:45
mveDave Kreskowiak20-Apr-05 5:45 
GeneralBlocking Pakets on Network Pin
Member 1226917219-Apr-05 21:38
Member 1226917219-Apr-05 21:38 
GeneralRe: Blocking Pakets on Network Pin
Dave Kreskowiak20-Apr-05 5:40
mveDave Kreskowiak20-Apr-05 5:40 
QuestionIs there something faster than .|[\r\n] in RegExp ? Pin
ektoras19-Apr-05 21:26
ektoras19-Apr-05 21:26 

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.