A really cool feature that I've been starting to use more frequently is pattern matching which also is cleanly implemented for switch statements in C#.
Example:
This allows me to check the type of object...
Read more
Example:
Code:
switch (_commTransport)
{
case TerminalDebugClient _:
((TerminalDebugClient)_commTransport).HostValidation += OnHostValidation;
break;
case SshDebugClient _:
((SshDebugClient)_commTransport).HostValidation += OnHostValidation;
break;
}
This allows me to check the type of object...
Read more