diff --git a/guide/english/csharp/is/index.md b/guide/english/csharp/is/index.md index 3a3e1ee405..ca7fc638b7 100644 --- a/guide/english/csharp/is/index.md +++ b/guide/english/csharp/is/index.md @@ -5,5 +5,13 @@ title: is ## is The `is` keyword checks if an object is compatible with a given type, or (starting with C# 7) tests an expression against a pattern. +## Example +```csharp + int number = 6; + Console.WriteLine(number is long); // False + Console.WriteLine(number is double); // False + Console.WriteLine(number is int); // True +``` + #### More information: - [C# Reference: is](https://docs.microsoft.com/dotnet/csharp/language-reference/keywords/is)