How get Argument value one console application to another console application using vb.net
Hi
I am using two console application i am pass argument one application to another application i can't get args value in my second application as well as return value
i am using below code
First Application
Try
Dim strReturn As String
Dim p As Diagnostics.Process = New Diagnostics.Process
p.StartInfo.Arguments = "A|" & "1001"
p.StartInfo.FileName = "F:\Senthil\Caluclation\Caluclation\bin\Debug\Caluclation.exe"
p.StartInfo.RedirectStandardOutput = True
p.StartInfo.UseShellExecute = False
p.Start()
' p.StartInfo.RedirectStandardOutput = True
p.StartInfo.RedirectStandardError = True
'p.WaitForExit()
strReturn = p.StandardOutput.ReadLine()
If p.StandardOutput.ReadLine() <> "" Then
End If
Catch ex As Exception
Console.WriteLine(ex)
End Try
Second Application
Dim str As String
str = Command()
Dim ch As Char() = {"|"}
Dim st As String() = str.Split(ch)
Dim strEmployeeType As String
Dim strIncome As String
strEmployeeType = st(0).Replace("'", "")
strIncome = st(1).Replace("'", "")
' SDFCalculation(strEmployeeType, strIncome)