Answer: With the help of Replace method we can repace any word from withing string value. It takes 2 parameters i.e. old_value and new_value.
For Example:-
string st_name = "Rajesh Sathua";
st_name = st_name.Replace("Rajesh", "Rajesh Kumar");
Output would be:Rajesh Kumar Sathua
Asked In: Many Interviews |
Alert Moderator