Click here to Skip to main content
15,882,163 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# Progammer Forum for Beginners? Pin
Richard MacCutchan2-Jan-18 23:43
mveRichard MacCutchan2-Jan-18 23:43 
GeneralRe: C# Progammer Forum for Beginners? Pin
User987433-Jan-18 23:49
professionalUser987433-Jan-18 23:49 
AnswerRe: C# Progammer Forum for Beginners? Pin
Marc Clifton3-Jan-18 1:45
mvaMarc Clifton3-Jan-18 1:45 
GeneralRe: C# Progammer Forum for Beginners? Pin
User987433-Jan-18 23:39
professionalUser987433-Jan-18 23:39 
AnswerRe: C# Progammer Forum for Beginners? Pin
BillWoodruff4-Jan-18 4:29
professionalBillWoodruff4-Jan-18 4:29 
GeneralRe: C# Progammer Forum for Beginners? Pin
User987434-Jan-18 5:50
professionalUser987434-Jan-18 5:50 
GeneralRe: C# Progammer Forum for Beginners? Pin
BillWoodruff4-Jan-18 21:09
professionalBillWoodruff4-Jan-18 21:09 
QuestionQuestion On Using IProgress Pin
Kevin Marois2-Jan-18 12:51
professionalKevin Marois2-Jan-18 12:51 
I'm uploading files to a server. The FTP class reports progress:
foreach (var file in publishInfo.Files)
{
    Progress<double> progress = new Progress<double>(x =>
    {
        ShowProgress("", x);  //<<==== HOW DO I GET FILE FROM THE FOREACH IN HERE?
    });

    client.UploadFile(file.FileName, targetFile, FtpExists.Overwrite, true, FtpVerify.Throw, progress);
}

then...

private void ShowProgress(FileEntity file, double progress)
{
//Do something here
}

I need to pass the loop object 'file' to the ShowProgress method. How do I get access it inside the progress callback?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

AnswerRe: Question On Using IProgress Pin
Kenneth Haugland3-Jan-18 18:48
mvaKenneth Haugland3-Jan-18 18:48 
Questionwhat is the C# code to read TYPES.cursortype in procedure Pin
sudipta saha1-Jan-18 21:31
sudipta saha1-Jan-18 21:31 
AnswerRe: what is the C# code to read TYPES.cursortype in procedure Pin
Luc Pattyn2-Jan-18 12:45
sitebuilderLuc Pattyn2-Jan-18 12:45 
GeneralRe: what is the C# code to read TYPES.cursortype in procedure Pin
sudipta saha2-Jan-18 20:40
sudipta saha2-Jan-18 20:40 
QuestionProblem with setwindowPOS and returning from topmost to standard window position? Pin
turbosupramk31-Jan-18 20:17
turbosupramk31-Jan-18 20:17 
AnswerRe: Problem with setwindowPOS and returning from topmost to standard window position? Pin
Richard MacCutchan1-Jan-18 23:07
mveRichard MacCutchan1-Jan-18 23:07 
GeneralRe: Problem with setwindowPOS and returning from topmost to standard window position? Pin
turbosupramk32-Jan-18 4:40
turbosupramk32-Jan-18 4:40 
GeneralRe: Problem with setwindowPOS and returning from topmost to standard window position? Pin
Richard MacCutchan2-Jan-18 5:38
mveRichard MacCutchan2-Jan-18 5:38 
GeneralRe: Problem with setwindowPOS and returning from topmost to standard window position? Pin
turbosupramk32-Jan-18 6:22
turbosupramk32-Jan-18 6:22 
GeneralRe: Problem with setwindowPOS and returning from topmost to standard window position? Pin
Richard MacCutchan2-Jan-18 6:42
mveRichard MacCutchan2-Jan-18 6:42 
GeneralRe: Problem with setwindowPOS and returning from topmost to standard window position? Pin
turbosupramk32-Jan-18 7:33
turbosupramk32-Jan-18 7:33 
GeneralRe: Problem with setwindowPOS and returning from topmost to standard window position? Pin
Luc Pattyn2-Jan-18 12:41
sitebuilderLuc Pattyn2-Jan-18 12:41 
GeneralRe: Problem with setwindowPOS and returning from topmost to standard window position? Pin
turbosupramk32-Jan-18 13:08
turbosupramk32-Jan-18 13:08 
GeneralRe: Problem with setwindowPOS and returning from topmost to standard window position? Pin
Luc Pattyn2-Jan-18 13:31
sitebuilderLuc Pattyn2-Jan-18 13:31 
GeneralRe: Problem with setwindowPOS and returning from topmost to standard window position? Pin
turbosupramk33-Jan-18 2:51
turbosupramk33-Jan-18 2:51 
GeneralRe: Problem with setwindowPOS and returning from topmost to standard window position? Pin
Richard MacCutchan3-Jan-18 23:18
mveRichard MacCutchan3-Jan-18 23:18 
GeneralRe: Problem with setwindowPOS and returning from topmost to standard window position? Pin
turbosupramk35-Jan-18 16:43
turbosupramk35-Jan-18 16:43 

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.