string getSomething(int? count)
{
if (!count.HasValue)
{
return string.Empty;
}
return count switch
{
1 => "първа",
2 => "втора",
3 => "трета",
4 => "четвърта",
5 => "пета",
6 => "шеста",
7 => "седма",
8 => "осма",
9 => "девета",
10 => "десета",
_ => string.Empty
};
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter