Cheat Sheet: C#, .NET Core

Series of short snippets of FUC. This one is for C# and .NET Core.
February 5, 2019
csharp .net

I often find myself searching the internet for the same four lines of C# all over again, because of my inability to remember anything and the complexity of my filesystem structure… That’s why I decided to start putting together quick snippets of Frequently Used Code (FUC).

This one is about ASP.NET Core.

It’s a living document, I keep updating it.

Merge array of strings into a single string

So simple that I’m ahsamed that I’m searching for it all over again…

var arr = new string[] { "A", "B", "C" }


string.Join(',', arr);
> A,B,C

string.Join(", ", arr);
> A, B, C
comments powered by Disqus