Answer the question
In order to leave comments, you need to log in
What can replace string interpolation in C# 5?
Interpolation has been available since C# 6. Are there any other ways to concatenate strings in C#5 other than this way:
public void Print(string str)
{
Console.WriteLine(DateTime.Now + str +" Ok!");
}
Answer the question
In order to leave comments, you need to log in
public void Print(string str)
{
Console.WriteLine(string.Format("{0} {1} Ok!", DateTime.Now, str));
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question