Something very basic seems to be escaping me.
Dim foo As New Dictionary(Of String, String) foo.Add('key', Nothing) foo.Add('key2', 'something')
I wish to get a IDictiorany(Of String, String) back, with only elements that have a non empty value. I thought this would do it:
foo.Where(Function(x) Not String.IsNullOrEmpty(x.Value))
But that ends up being the wrong type. Adding:
.ToDictionary(Function(x) x.Key)
Doesn’t help any either. Any tips?
Ah… Answered my own question. Will leave this up just in case it is of any use to someone else.