Question:You are writing a method that accepts a string parameter named message. Your method must break the message parameter into individual lines of text and pass each line to a second method named Process. Which code segment should you use? 

A Dim reader As New StringReader(message)
ProcessMessage(reader.ToString())
reader.Close() 

B Dim reader As New StringReader(message)
While reader.Peek() <> -1
ProcessMessage(reader.ReadLine())
End While
reader.Close() 

C Dim reader As New StringReader(message)
While reader.Peek() <> -1
Dim line as String = reader.Read().ToString()
ProcessMessage(line)
End While
reader.Close() 

D Dim reader As New StringReader(message)
ProcessMessage(reader.ReadToEnd())
reader.Close() 

+ Answer
+ Report
Total Preview: 902

Copyright © 2024. Powered by Intellect Software Ltd