Is there any way how to write TryGetValue on one line in If condition. Normal way of calling TryGetValue would be:
string value;
Dictionary.TryGetValue("Key", out value);
If(value == "condition") { ... }
What I am looking for would be something like this.
If(Dictionary.TryGetValue("Key", out string) == "Condition") { ... }
I know that line wouldn't work, however it shows what is desired result.
Is there any way how to achieve this?