Today I see this code:
ViewBag.country = from p in CultureInfo.GetCultures(CultureTypes.AllCultures & ~CultureTypes.NeutralCultures)
select new SelectListItem
{
Text = p.EnglishName,
Value = p.DisplayName
};
And I canβt understand. "~" - Is that a mistake? As far as I remember, "~" is placed before the destructors. But this is an enumeration. And this code compiled!
source
share