C# 7.0 Feature or what - [ClassName] obj when obj.Type is SomeType some : <p>I have been recently assigned to a project which is using C# 7.0. While I was debugging the code I came across some switch case statement and in that it was written something like below: </p>

<pre><code>switch (message)
{
    case  MyClass obj when obj.Type is MyType type:
     // Dome Action
    break;
    case  MyClass1 obj when obj.Type is MyType1 type:
     // Some Action
    break;
}
</code></pre>

<p>I want to understand the purpose behind this magical statement. </p>
