I have refactored one of my cognitively complex method into the following code:
dynamic list = someVaiable switch { "a" => new List<(int,Class