Working with Strings
Strings in C# are powerful. Here are key techniques:
1. Interpolation (Recommended):
csharp string firstName = "John"; string lastName = "Doe"; string msg = $"My name is: {firstName} {lastName}";
2. Built-in Methods:
text.ToUpper()/text.ToLower()text.Contains("word")text.Lengthtext.Substring(0, 5)
3. Escaping:
Use \ to include special characters like \" or \n.