is operator tells if a reference is a certain class.
using System;
class Person
{
public string name;
}
class Employee : Person
{
public string companyName;
}
class Program
{
static void Main(string[] args)
{
Person p = new Employee();
Console.WriteLine(p is Employee);
}
}
The output:
True