You are developing an application by using C#. The application includes a method named
SendMessage. The SendMessage() method requires a string input.
You need to replace “Hello” with “Goodbye” in the parameter that is passed to the
SendMessage() method.
Which two code segments can you use to achieve this goal? (Each correct answer presents
a complete solution. Choose two.)
A.
Option A
B.
Option B
C.
Option C
D.
Option D
Explanation:
* The first parameter should be Hello.
* String.Replace Method (String, String)
Returns a new string in which all occurrences of a specified string in the current instance are
replaced with another specified string.
This method does not modify the value of the current instance. Instead, it returns a new
string in which all occurrences of oldValue are replaced by newValue.
BC
yes, https://msdn.microsoft.com/en-us/library/fk49wtc1(v=vs.110).aspx