LANGUAGE
Declaration pattern
Tests a compatible non-null runtime type and binds a local on success.
Formal Syntax & Structure
csharp syntaxcsharp
value is Type variableWorking Example
Example Snippetcsharp
object item = "Atlas";if (item is string title) System.Console.WriteLine(title);