mirror of
https://github.com/github/codeql.git
synced 2026-04-17 21:14:02 +02:00
21 lines
373 B
C#
21 lines
373 B
C#
class UselessIsBeforeAs
|
|
{
|
|
class Square
|
|
{
|
|
public int width;
|
|
}
|
|
class Rectangle : Square
|
|
{
|
|
public int height;
|
|
}
|
|
public static void Main(string[] args)
|
|
{
|
|
Square a = new Rectangle();
|
|
if (a is Rectangle)
|
|
{
|
|
Rectangle r = a as Rectangle;
|
|
Console.WriteLine(r.height);
|
|
}
|
|
}
|
|
}
|