Answers for "$ format in c#"

C#
14

string format c#

using System;

namespace FormatingTest
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = "Name:{0} {1}, Location:{2}, Age:{3}";
            string msg = string.Format(s, "Ram", "Singh", "Mumbai", 32);
            Console.WriteLine("Format Result: {0}", msg);
            Console.WriteLine("nPress Enter Key to Exit..");
            Console.ReadLine();
        }
    }
}
Posted by: Guest on April-02-2020

C# Answers by Framework

Browse Popular Code Answers by Language