Skip to content

Switch Expression in C# #143

Answered by LuohuaRain
ShervanN asked this question in Q&A
Nov 5, 2022 · 1 comments · 3 replies

You must be logged in to vote
static string Pattern(string myString)
{
	return myString[0] switch
	{
		'A' => "first",
	};
}

Replies: 1 comment 3 replies

You must be logged in to vote
3 replies
@ShervanN

@christiannagel

@ShervanN

Answer selected by christiannagel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants