File tree Expand file tree Collapse file tree 5 files changed +22
-22
lines changed
system.String.TrimStart/vb
system.reflection.propertyinfo.getvalue/vb
VS_Snippets_CLR/Process_GetProcessesByName2_2/VB
api/system.diagnostics/process/standarderror Expand file tree Collapse file tree 5 files changed +22
-22
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ Namespace Applications.ConsoleApps
77 Console.WriteLine()
88 Dim s = Console.ReadLine()
99 ShowWords(s)
10- Console.Write( "\nPress any key to continue... ")
10+ Console.Write( $ "{vbCrLf}Press any key to continue... ")
1111 Console.ReadKey()
1212 End Sub
1313
Original file line number Diff line number Diff line change @@ -45,11 +45,11 @@ Class GetProcessesByNameClass
4545 Catch e As PlatformNotSupportedException
4646 Console.WriteLine(
4747 "Finding notepad processes on remote computers " &
48- "is not supported on this operating system." ) ;
48+ "is not supported on this operating system." )
4949 Catch e As InvalidOperationException
5050 Console.WriteLine( "Unable to get process information on the remote computer." )
5151 End Try
52- End Sub 'Main
53- End Class 'GetProcessesByNameClass
52+ End Sub
53+ End Class
5454' </Snippet1>
5555' </Snippet2>
Original file line number Diff line number Diff line change @@ -51,10 +51,10 @@ Public Class TrimExample
5151 ' <Snippet1>
5252 Public Sub Main()
5353 ' TrimStart Examples
54- Dim lineWithLeadingSpaces as String = " Hello World!" ;
55- Dim lineWithLeadingSymbols as String = "$$$$Hello World!" ;
56- Dim lineWithLeadingUnderscores as String = "_____Hello World!" ;
57- Dim lineWithLeadingLetters as String = "xxxxHello World!" ;
54+ Dim lineWithLeadingSpaces as String = " Hello World!"
55+ Dim lineWithLeadingSymbols as String = "$$$$Hello World!"
56+ Dim lineWithLeadingUnderscores as String = "_____Hello World!"
57+ Dim lineWithLeadingLetters as String = "xxxxHello World!"
5858 Dim lineAfterTrimStart = String .Empty
5959
6060 ' Make it easy to print out and work with all of the examples
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ End Class
3131
3232Module Example
3333 Public Sub Main()
34- Dim jupiter As New Planet( "Jupiter" , 3.65e08 ) ;
34+ Dim jupiter As New Planet( "Jupiter" , 3.65e08 )
3535 GetPropertyValues(jupiter)
3636 End Sub
3737
Original file line number Diff line number Diff line change 1- Imports System.Diagnostics '
1+ Imports System.Diagnostics
22
33Public Module Example
4- Public Sub Main()
5- Dim p As New Process()
6- p.StartInfo.UseShellExecute = False
7- p.StartInfo.RedirectStandardError = True
8- p.StartInfo.FileName = "Write500Lines.exe"
9- p.Start()
4+ Public Sub Main()
5+ Dim p As New Process()
6+ p.StartInfo.UseShellExecute = False
7+ p.StartInfo.RedirectStandardError = True
8+ p.StartInfo.FileName = "Write500Lines.exe"
9+ p.Start()
1010
11- ' To avoid deadlocks, always read the output stream first and then wait.
12- Dim output As String = p.StandardError.ReadToEnd()
13- p.WaitForExit()
11+ ' To avoid deadlocks, always read the output stream first and then wait.
12+ Dim output As String = p.StandardError.ReadToEnd()
13+ p.WaitForExit()
1414
15- Console.WriteLine( $"\nError stream: {output}" ) ;
16- End Sub
15+ Console.WriteLine( $"{vbCrLf}Error stream: {output}" )
16+ End Sub
1717End Module
1818' The end of the output produced by the example includes the following:
1919' Error stream:
20- ' Successfully wrote 500 lines.
20+ ' Successfully wrote 500 lines.
You can’t perform that action at this time.
0 commit comments