programming-examples/c-sharp/Strings/C# Program to Replace a Character with the String.cs
2019-11-15 12:59:38 +01:00

17 lines
402 B
C#

/*
* C# Program to Replace a Character with the String
*/
using System;
class Program
{
static void Main(string[] args)
{
string s = "".PadLeft(5, 'X').Replace("X", "Sanfoundry");;
Console.Write("The String After the Replacement :{0}",s);
Console.Read();
}
}
/*
The String After the Replacement :SanfoundrySanfoundrySanfoundrySanfoundrySanfoundry