using System;
namespace CustomerTest
{ public class Customer1
{ public enum sex
{ man,
woman,
};
private string s_name;
public string Name
{ get
{
return s_name;
}
}
private sex m_sex;
public sex Sex{
get
{
return m_sex;
}
}
private string s_no;
public string No
{ get
{
return s_no;
}
set
{ if (s_no!=value)
{ s_no=value;
}
}
}
private int i_day;public int Day
{
get
{
return i_day;
}
set
{
if (i_day != value)
{
i_day = value;
}
}
}
public void Customer(string name, sex sex, string no, int day)
{
s_name = name;
m_sex = sex;
s_no = no;
i_day = day;
}
}
}错误 不包含适合于入口点的静态“Main”方法 求错误解释。
namespace CustomerTest
{ public class Customer1
{ public enum sex
{ man,
woman,
};
private string s_name;
public string Name
{ get
{
return s_name;
}
}
private sex m_sex;
public sex Sex{
get
{
return m_sex;
}
}
private string s_no;
public string No
{ get
{
return s_no;
}
set
{ if (s_no!=value)
{ s_no=value;
}
}
}
private int i_day;public int Day
{
get
{
return i_day;
}
set
{
if (i_day != value)
{
i_day = value;
}
}
}
public void Customer(string name, sex sex, string no, int day)
{
s_name = name;
m_sex = sex;
s_no = no;
i_day = day;
}
}
}错误 不包含适合于入口点的静态“Main”方法 求错误解释。
解决方案 »
- 用C#编程 将doc文件转docx文件
- C#如何将#ff0000这种颜色转换为:255,0,0这种格式的。。。。求高手
- 在 System.ArgumentException 中第一次偶然出现的“System.Windows.Forms.dll”类型的异常
- 一个窗体调另一个另一个exe中的窗体
- 更新datatable的问题
- 请问如何保证Process.Start开启的程序在前台
- 關于VS2005的一個調試現像
- vs 2003的bug?同样的代码,放到Button的Click事件和ToolBar的ButtonClick事件中结果不同
- C#如何实现鼠标拖拽呢?
- 使用C#如何连接Sybase ASA数据库?
- 纠结 面向对象的三大特性
- 项目生成发布后运行报错。
你这是要生成类文件的吧,右键点项目再点生成,不要直接debug,生成成功就表示没有问题
添加一个方法:
static Main()
{}
生成的是dll文件,后缀名.dll 在debug 里面还是bin里面忘了