top of page
Admin

C# Placeholder

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 

2 views0 comments

Recent Posts

See All

Reading a csv file by using tcl

Reading a csv file procedure is similar to the other programming languages. # Open the CSV file in read mode set filePath...

Комментарии

Оценка: 0 из 5 звезд.
Еще нет оценок

Добавить рейтинг
bottom of page