C# inheritance
namespace TreehouseDefense
{
class Point
{
int XPos;
int YPos;
public Point(int x, inty)
{
XPos = x;
YPos = y;
}
}
}
namespace TreehouseDefense
{
class MapLocation : Point
{
public MapLocation(int x, int y) : base(x, y)
{
}
}
}
typeCheck
x is MapLocation