KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have this code, when I try to get not existed culture I get exception. Is there exists method like TryGetCultureInfo , which return bool value? I don't want to use try-catch statement CultureInfo culture = CultureInfo.GetCultureInfo(cultureCode); if (culture == null) { culture = CultureInfo.GetCultureInfo(DefaultCultureCode); }
Tags (comma-separated)
Save Edits
Cancel