C# Placeholder
- Admin
- May 13, 2024
- 1 min read
When you define a seri in C#, it follows the variables in the list provided. The seri is defined inside the Console.Writeline ("{1}-{0}",word2,word1).
string word1 = "C#";
string word2 = "Programming";
Console.WriteLine("{0}-{1}",word2,word1);
// Output
// word2 is the first member of the seri
// word1 is the second member of the seri
// there is "-" sign between word2 and word1
// the result is Programming-C#
If you write Console.Writeline ("{0}-{1}",word2,word1); the result will be "C#-Programming"
Another example
int a = 5;int b = 12;int c = -7;Console.Write("{2} {0} {1}", c, a, b);// Output 12 -7 5 
Comments