CSharp - Write program to pad string

Requirements

Suppose you have the string: Welcome to C# programming.

Then how can we print: ***Welcome to C# programming### ?

Hint

Use PadLeft to append string to left.

Demo

using System;

public class MainClass{
   public static void Main(String[] argv){
        string welcome = "Welcome to C# programming";
        string welcome1=welcome.PadLeft(welcome.Length+3,'*');
        string welcome2= welcome1.PadRight(welcome1.Length+3,'#');
        Console.WriteLine(welcome2);/*from   w w w . ja  va  2  s .  c o  m*/
   }
}

Result