Efficiency At Its Best | Avoid Concat And TakeWhile For C# Substring Before A Character



Efficiency At Its Best | Avoid Concat And TakeWhile For C# Substring Before A Character

Efficiency At Its Best | Avoid Concat And TakeWhile For C# Substring Before A Character

It’s good practice to use code that performs well. In this video, I give a quick tip on how to get C# substrings before a certain character with IndexOf and Substring. While it may be tempting to use short code, performance, and readability will suffer. Don’t make that mistake. Test your code and make sure others can quickly figure out how and what is going on by making it simple.

Additional Info:
____________________________________________

For the full video see “Extracting C# Substrings Before Or After A Certain Character” via https://youtu.be/8GFjuHgdOks

More details in the article “In C#, Get A Substring Before Or After A Certain Character”: https://puzzledbycsharp.com/string/get-a-substring-before-or-after-a-certain-character/
____________________________________________

► There is a variety of how-to articles, code snippets, and practice code, which cover a variety of topics. https://puzzledbycsharp.com/

#csharp #dotnet #coding #programming

Comments are closed.