What's the best way to solve it?
I have tried :
using System;
using System.Globalization;
using System.Linq;
using System.Collections.Generic;
class HelloWorld {
static void Main() {
List<CultureInfo> CultureInfos = CultureInfo
.GetCultures(CultureTypes.SpecificCultures)
.ToList();
var a = CultureInfos.Where(x => x.DisplayName.Contains("Israel"))
.FirstOrDefault();
Console.WriteLine(a?.DisplayName.Split(' ')[0]);
}
}
Funny thing, It works on onlinegdb.com but doesn't work on my local machine .Net core 3.1. It returns Null in "a" Tried to find any clue to their .Net version - no success
Do you know why? / What I'm doing wrong?
Thanks