SEARCH C# PROGRAMMING CODES HERE

Replace();

Replace(); function in C#
This function is used to replace string object with the another specified string object.

Example

using System;

namespace program
{   
class Program
    {
        static void Main(string[] args)
        {
            string str1 = "Hello ";
            string str2 = str1.Replace("Hello", "Wellcome");
            Console.WriteLine(str2); 
            Console.ReadKey();
             
        }
           
    }
 }

Output
Wellcome