C#定义,使用类——VS2008(我是新手哦) using System; using System.Collections.Generic; using System.Linq; using System.Text;
namespace shanjiaoxing { class shanjiaoxing { private int a; private int b; private int c; public shanjiaoxing (int x,int y,int z) { a = x; b = y; c = z; } ~shanjiaoxing() { } public double Calculate() { int s; double area; s = (a + b + c) / 3; area = Math.Sqrt(s*(s-a)*(s-b)*(s-c)); return area; } } class Program { static void main(string[] args) { shanjiaoxing sjx = new shanjiaoxing(3, 4, 5); double area=sjx.Calculate(); Console.WriteLine("三角形的面积是{0}",area); Console.ReadLine(); } } } 错误 1 程序“F:\ht\作业\专业课\VS 作业\随便\课后作业\5道题\shanjiaoxing\obj\Debug\shanjiaoxing.exe”不包含适合于入口点的静态“Main”方法 shanjiaoxing