Created
December 5, 2022 21:04
-
-
Save allrameest/2ae978672d5b40113c7a7d2488bdac9e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var keys = new[] {1, 2, 3}; | |
var map1 = new Dictionary<int, string>(); | |
var map2 = new Dictionary<int, string>(); | |
var items = | |
from key in keys | |
let value1 = map1.GetValueOrDefault(key) | |
where value1 != null | |
let value2 = map2.GetValueOrDefault(key) | |
let whatever = 123 | |
select new | |
{ | |
Value1 = value1.ToUpper(), | |
Value2 = value2 != null ? value2.ToUpper() : string.Empty | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment