namespace app01; class Triangle { public double CalcArea(double tbase, double theight) { if (this == null) { throw new InvalidOperationException("Triangle instance is null."); } return tbase * theight / 2; } }