About
In this code snippet, we will learn how to use the is operator in C#.
The is operator is very similar to the as operator. They can both be used to check if an object is of a certain type. Additionally as can be used to perform type casting.
If the object matches the specified data type true gets returned else false will be returned.
Let’s have a look at the code below to see how to use the is operator.
Code:
[amp-gist id=”7e4b372ff19af388b8768bd5d6939eef”]