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.
string st_name = "Rajesh Sathua";
Output would be:Rajesh Kumar Sathua
st_name = st_name.Replace("Rajesh", "Rajesh Kumar");
Asked In: Many Interviews |