I normally programming in C# but have be asked to use vb.net for my current website and was wondering how you would convert the below C# code into vb.net code.
The code converts a dictionary to a list of SelectListItem’s
return dic.Select(x => new SelectListItem() { Text = x.Value.ToString(), Value = x.Key.ToString(), Selected= EqualityComparer<T>.Default.Equals(x.Key, selectedKey) });
Any help would be amazing.
Thank you
Query syntax* is often more readable in VB.NET:
* It’s also more pewerful than in C#