How to use PadRight() and PadLeft() in C#

1 Answer

0 votes
using System;

namespace ConsoleApplication_C_Sharp
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Write("c#".PadRight(13, '.'));
            Console.WriteLine("1".PadLeft(3, '.'));
        }
    }
}


/*
run:
    
c#.............1

*/

 



answered Feb 11, 2017 by avibootz

Related questions

1 answer 234 views
1 answer 129 views
129 views asked Feb 12, 2017 by avibootz
2 answers 224 views
1 answer 100 views
1 answer 103 views
1 answer 78 views
...