Click here to Skip to main content
15,112,662 members
Home / Discussions / C#
   

C#

 
AnswerRe: Equation on c# Pin
Richard MacCutchan3-Oct-12 22:41
mveRichard MacCutchan3-Oct-12 22:41 
QuestionImplementing Private Inheritence Pin
AmbiguousName3-Oct-12 20:07
MemberAmbiguousName3-Oct-12 20:07 
AnswerRe: Implementing Private Inheritence Pin
Peter_in_27803-Oct-12 20:21
professionalPeter_in_27803-Oct-12 20:21 
GeneralRe: Implementing Private Inheritence Pin
AmbiguousName3-Oct-12 20:33
MemberAmbiguousName3-Oct-12 20:33 
GeneralRe: Implementing Private Inheritence Pin
Peter_in_27803-Oct-12 20:50
professionalPeter_in_27803-Oct-12 20:50 
AnswerRe: Implementing Private Inheritence Pin
Pete O'Hanlon3-Oct-12 23:19
mvePete O'Hanlon3-Oct-12 23:19 
AnswerRe: Implementing Private Inheritence Pin
jschell4-Oct-12 12:39
Memberjschell4-Oct-12 12:39 
Questionprocess being called by C# app Pin
rachel_m3-Oct-12 19:28
Memberrachel_m3-Oct-12 19:28 
In a C# 2008 application, I have a foreach loop that is listed below:
for each (PkgID in PkgIDs) 
  {
Process eProcess = new Process();
 String Process_Arguments = null;
 eProcess.StartInfo.UseShellExecute = false;
 eProcess.StartInfo.FileName = strConsoleAppLocation;
 Process_Arguments = filedirectorypath + " 7654" + PkgID;
 eProcess.StartInfo.Arguments = Process_Arguments;
 eProcess.Start();
 eProcess.WaitForExit(1800);
 eProcess = null;
 Process_Arguments = null;
}

As you can see from the code I listed above I have the following questions:
1. For each iteration of the for loop I create a new process object called eProcess and then I set
eProcess = null;
near the end of the loop.
Thus can you tell me if this is code or not and why? If you have better code that I could use would you tell me what you recommend by pointing me to some code I can use as a reference?
2. You can see that I also have the following line of code,
eProcess.WaitForExit(1800);

I have this line since the process that is being called does not seem to complete its processing before the control is returned to this program.
Thus can you tell me the following:
a. Is the number of milliseconds that I specify a good amount? Can you tell me why or why not?
b. Since the code is returned to this calling program before the entire eProcess finished, can you tell me if this is a good way to wait for the eprocess to finish? I would think there is a better way to what for eProcess to finish. If so, is there a way to tell when the eProcess
is really finished executing?
AnswerRe: process being called by C# app Pin
Smart Arab3-Oct-12 21:54
MemberSmart Arab3-Oct-12 21:54 
QuestionFail Read Int64 value from binary file created by C++ Pin
kisetsu3-Oct-12 15:49
Memberkisetsu3-Oct-12 15:49 
QuestionThere is an error in XML document calling a PHP Webservice Pin
RalphGielkens3-Oct-12 11:54
MemberRalphGielkens3-Oct-12 11:54 
QuestionPassing object[] Elements as Parameters to Invoke() Pin
ezazazel3-Oct-12 8:04
Memberezazazel3-Oct-12 8:04 
AnswerRe: Passing object[] Elements as Parameters to Invoke() Pin
Matt T Heffron3-Oct-12 10:08
professionalMatt T Heffron3-Oct-12 10:08 
GeneralRe: Passing object[] Elements as Parameters to Invoke() Pin
ezazazel3-Oct-12 20:26
Memberezazazel3-Oct-12 20:26 
QuestionC# calling executable Pin
dcof3-Oct-12 4:57
Memberdcof3-Oct-12 4:57 
AnswerRe: C# calling executable Pin
Pete O'Hanlon3-Oct-12 5:16
mvePete O'Hanlon3-Oct-12 5:16 
AnswerRe: C# calling executable Pin
Shameel3-Oct-12 5:51
professionalShameel3-Oct-12 5:51 
AnswerRe: C# calling executable Pin
Dave Kreskowiak3-Oct-12 6:35
mveDave Kreskowiak3-Oct-12 6:35 
GeneralRe: C# calling executable Pin
dcof3-Oct-12 9:07
Memberdcof3-Oct-12 9:07 
GeneralRe: C# calling executable Pin
Pete O'Hanlon3-Oct-12 9:38
mvePete O'Hanlon3-Oct-12 9:38 
GeneralRe: C# calling executable Pin
Dave Kreskowiak3-Oct-12 14:45
mveDave Kreskowiak3-Oct-12 14:45 
QuestionC# Windows application not responding after 30 minutes Pin
sujithkumarsl2-Oct-12 11:13
Membersujithkumarsl2-Oct-12 11:13 
AnswerRe: C# Windows application not responding after 30 minutes Pin
Smart Arab2-Oct-12 11:58
MemberSmart Arab2-Oct-12 11:58 
AnswerRe: C# Windows application not responding after 30 minutes Pin
Dave Kreskowiak2-Oct-12 13:35
mveDave Kreskowiak2-Oct-12 13:35 
GeneralOT Pin
Peter_in_27802-Oct-12 23:08
professionalPeter_in_27802-Oct-12 23:08 

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.