string format c#
name = "Bob";
age = 27;
info = $"Your name is {name} and you are {age} years old";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();
}
}
}
Also in C#:
- c# list to string comma separated
- c# linq select from object list
- mouseposition unity
- unity multiplayer
- how to add a list to observablecollection in c#
- grab reference from method parameter c#
- class selector to property in asp net core dropdown
- change Backcolor c#
- C# type cast float to string
- conditional compilation c#
- c# pass mouse events to parent
- c# date
- unity how to change text in script
- page refresh on button click in c#
- windows forms iterate through all controls
- wpf binding ancestor codebehind
- c# make string null
- c# constructor
- abstract class c#
- unity how to move an object to another object
- c# make request to rest api
- c# skip following code in loop
- button commandfield commandargument pass textbox
- c# find where word is contained in a string