Click here to Skip to main content
15,901,283 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to convert variable name to string? Pin
SledgeHammer019-Mar-11 6:30
SledgeHammer019-Mar-11 6:30 
AnswerRe: How to convert variable name to string? Pin
Pete O'Hanlon9-Mar-11 6:54
mvePete O'Hanlon9-Mar-11 6:54 
QuestionBetter progressbar? Pin
Etienne_1238-Mar-11 22:44
Etienne_1238-Mar-11 22:44 
AnswerRe: Better progressbar? Pin
Luc Pattyn8-Mar-11 23:17
sitebuilderLuc Pattyn8-Mar-11 23:17 
Questionc# Pin
pranitdarekar8-Mar-11 20:13
pranitdarekar8-Mar-11 20:13 
AnswerRe: c# Pin
Pravin Patil, Mumbai8-Mar-11 21:08
Pravin Patil, Mumbai8-Mar-11 21:08 
AnswerRe: c# Pin
OriginalGriff8-Mar-11 21:10
mveOriginalGriff8-Mar-11 21:10 
QuestionRe: c# PinPopular
David19878-Mar-11 21:15
David19878-Mar-11 21:15 
AnswerRe: c# Pin
Dalek Dave8-Mar-11 22:28
professionalDalek Dave8-Mar-11 22:28 
AnswerRe: c# Pin
OriginalGriff8-Mar-11 23:46
mveOriginalGriff8-Mar-11 23:46 
GeneralRe: c# Pin
Eddy Vluggen9-Mar-11 0:21
professionalEddy Vluggen9-Mar-11 0:21 
GeneralRe: c# Pin
musefan9-Mar-11 4:19
musefan9-Mar-11 4:19 
GeneralRe: c# Pin
Eddy Vluggen9-Mar-11 8:33
professionalEddy Vluggen9-Mar-11 8:33 
GeneralRe: c# Pin
_Erik_9-Mar-11 3:54
_Erik_9-Mar-11 3:54 
AnswerRe: c# Pin
RaviRanjanKr9-Mar-11 16:52
professionalRaviRanjanKr9-Mar-11 16:52 
QuestionMaking a generic progress form Pin
Etienne_1238-Mar-11 19:30
Etienne_1238-Mar-11 19:30 
AnswerRe: Making a generic progress form Pin
Robert Rohde8-Mar-11 21:00
Robert Rohde8-Mar-11 21:00 
Hi,

there are many solutions too this problem.

In your situation I would ask the question why a delegate is needed at all. As I can see you have a UpdateProgress method in your form. Lets assume it is public, then a caller could do the following:
ProgressForm pf = new ProgressForm();
pf.Show();
for (int i = 0; i < 10000; i++)
{
   //do some work
   pf.UpdateProgress(i);
}


To seperate the worker and the form you could introduce an interface along with a factory but I think this would go a bit to far for a forum answer Smile | :) .

Also browse through atricle on this site related to your needs: http://www.codeproject.com/info/search.aspx?artkw=progress[^]

Robert
AnswerRe: Making a generic progress form Pin
_Erik_9-Mar-11 2:32
_Erik_9-Mar-11 2:32 
AnswerRe: Making a generic progress form Pin
RaviRanjanKr9-Mar-11 17:14
professionalRaviRanjanKr9-Mar-11 17:14 
GeneralRe: Making a generic progress form Pin
Etienne_1239-Mar-11 19:48
Etienne_1239-Mar-11 19:48 
QuestionLINQ to SQL - join and where: Is it performed in Database? Or load the dataset into memory before operation actually is performed? Pin
devvvy8-Mar-11 15:32
devvvy8-Mar-11 15:32 
AnswerRe: LINQ to SQL - join and where: Is it performed in Database? Or load the dataset into memory before operation actually is performed? Pin
Andy Brummer8-Mar-11 16:10
sitebuilderAndy Brummer8-Mar-11 16:10 
GeneralRe: LINQ to SQL - join and where: Is it performed in Database? Or load the dataset into memory before operation actually is performed? Pin
devvvy9-Mar-11 2:22
devvvy9-Mar-11 2:22 
QuestionTrying to write to a microchip, looking for guidance Pin
turbosupramk38-Mar-11 14:09
turbosupramk38-Mar-11 14:09 
AnswerRe: Trying to write to a microchip, looking for guidance Pin
Dan Mos9-Mar-11 0:33
Dan Mos9-Mar-11 0:33 

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.