The Basics of Strings! [Pt 5] | C# for Beginners
HTML-код
- Опубликовано: 9 ноя 2023
- View full playlist: aka.ms/dotnet/beginnervideos/...
Set up C# in VS Code: aka.ms/dotnet/get-started/vscode
🏆Earn the C# Certification: aka.ms/csharp-certification
What is a string? How are characters "strung" together to make a string in C# and .NET? In this video, Scott and David show you how to declare a string, concatenate strings, use string interpolation, and trim whitespace.
Links:
.NET Beginner Videos: aka.ms/dotnetvideos
MS Learn: aka.ms/dotnet/beginnervideos/...
Blog: aka.ms/dotnet/blog
Twitter: aka.ms/dotnet/twitter
TikTok: aka.ms/dotnet/tiktok
Mastodon: aka.ms/dotnet/mastodon
LinkedIn: aka.ms/dotnet/linkedin
Facebook: aka.ms/dotnet/facebook
Docs: learn.microsoft.com/dotnet
Forums: aka.ms/dotnet/forums
🙋♀️Q&A: aka.ms/dotnet-qa
👨🎓Microsoft Learn: aka.ms/learndotnet
#dotnet #csharp Наука
Wow, what a way to present this material. This course is way too underrated.
Best teachers at work.
I Love these two guys.
love the frozen joke Scott!
This content is gold thanks
thank you guys!
I really like how they act like they dont know what they are talking about lol.
Completed.
amazing tutorial. a hidden gem! I was wondering what would happen if we have " Maria Gonzales " as string. The spaces between the first and last name are NOT trimmed. For that Regex.Replace(firstFriend.Trim(), " +", " ") would work.
I hope you will add actively translated subtitles to the video because automatically translated subtitles are not seamless and it is difficult for people who do not know English to understand the video clearly.
Hey David. Hello Scott
Hello!
string firstFriend = " David ";
string secondFriend = " Scott ";
firstFriend = firstFriend.TrimStart().TrimEnd(); // Also, can make use of 'chaining' of Methods
Console.WriteLine($"My friends are {firstFriend} and {secondFriend.Trim()}"); // $ string interpolation