c# string formatting
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();
}
}
}name = "Bob";
age = 27;
info = $"Your name is {name} and you are {age} years old";
Also in C#:
- constructor in inherited class c#
- membership get user id
- length of a string c#
- .net loop through dictionary
- snake game
- c# trim string
- c# webrequest cookies
- iteration c#
- c# build string out of list of strings
- conditional compilation c#
- how to get length of okobjectresult c#
- unity how to change the text on a button
- c# discord bot
- unity inspector header attribute
- C# extend array
- how to change scenes in unity
- how to compare datetime in c#
- unity check when clicked on object
- how to set progress openedge driver name for odbc connection c#
- C# resize window without title bar
- unity fall damage c#
- how to get component in unity c#
- Movement 2d unity
- ecs get specific entities with component