29/10/16 15:02
WCodeLyokoYT
Ciao, volevo sapere come eliminare il contenuto di una stringa dopo un dato carattere.
Ho provato con il metodo substring/indexof, ma mi restituisce degli errori in output ('System.ArgumentOutOfRangeException' in mscorlib.dll , 'System.Reflection.TargetInvocationException' in mscorlib.dll e 'System.ArgumentOutOfRangeException' in Microsoft.VisualBasic.dll)
Qui il codice del programma
Le mie variabili hanno sempre dei bei nomi
Ho provato con il metodo substring/indexof, ma mi restituisce degli errori in output ('System.ArgumentOutOfRangeException' in mscorlib.dll , 'System.Reflection.TargetInvocationException' in mscorlib.dll e 'System.ArgumentOutOfRangeException' in Microsoft.VisualBasic.dll)
Qui il codice del programma
Dim process As New Process() process.StartInfo.FileName = "C:\Users\Code\Desktop\ps3mca-tool-fmcb-1.93\ps3mca-tool.exe" process.StartInfo.Arguments = " -ls /" process.StartInfo.UseShellExecute = False process.StartInfo.RedirectStandardOutput = True process.Start() Dim reader As StreamReader = process.StandardOutput Dim output As String = reader.ReadToEnd() Dim c As Array = output.Split(vbNewLine) Dim i As Integer = 0 Dim a For Each item In c a = c(i) Console.WriteLine(a.substring(0, a.indexof("|"))) i = i + 1 Next process.WaitForExit() process.Close()
Le mie variabili hanno sempre dei bei nomi
Ultima modifica effettuata da WCodeLyokoYT 29/10/16 15:02
aaa