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 220 views
1 answer 119 views
119 views asked Feb 12, 2017 by avibootz
2 answers 210 views
1 answer 92 views
1 answer 95 views
1 answer 62 views
1 answer 78 views
78 views asked Oct 31, 2024 by avibootz
...