19. C#Record Types
public class Triangle : Shape
{
public int A { get; set; }
public int B { get; set; }
public int C { get; set; }
}
public class Triangle(int A, int B, int C )
: Shape {}
20. C#Default interface methods
interface IPoint
{
(int x, int y) GetPoint() { return (0, 0); }
}
class Point : IPoint
{ }
IPoint point = new Point();
point.GetPoint();
23. C#Negated-condition if statement
if( !(shape is Triangle)) {};
if(shape is not Triangle) {};
if!(shape is Triangle) {};
unless (shape is Triangle) {};