what is string in c# code example
Example 1: how to make a string in c#
string teststring = "";
Example 2: string $ c#
var jh = (firstName: "Jupiter", lastName: "Hammon", born: 1711, published: 1761);
Console.WriteLine($"{jh.firstName} {jh.lastName} was an African American poet born in {jh.born}.");
Console.WriteLine($"He was first published in {jh.published} at the age of {jh.published - jh.born}.");
Console.WriteLine($"He'd be over {Math.Round((2018d - jh.born) / 100d) * 100d} years old today.");
Example 3: c# $ string
string color = blue;
Console.WriteLine("The sky is " + color);
Console.WriteLine($"The sky is {color}");