using System;
using System.Collections.Generic;
using System.Text;namespace aaa
{
class UserIntType
{
private string _display;
private int _val; public UserIntType(string display, int val)
{
this._display = display;
this._val = val;
} public string DisplayName
{
get { return this._display; }
} public int ValueName
{
get { return this._val; }
}
}
}
最好能给出注释,这个类是来做什么的,配和api使用
using System.Collections.Generic;
using System.Text;namespace aaa
{
class UserIntType
{
private string _display;
private int _val; public UserIntType(string display, int val)
{
this._display = display;
this._val = val;
} public string DisplayName
{
get { return this._display; }
} public int ValueName
{
get { return this._val; }
}
}
}
最好能给出注释,这个类是来做什么的,配和api使用
解决方案 »
- winform界面如何添加个加载中效果。。。
- VS2005,多项目一起调试
- 100分急求解决,画面弹出以后,任务栏上名字显示问题
- 在win2000下,label背景问题
- WinForm怎样做按钮的凸起和凹下效果vs2005(C#)
- 从数据库中得到的数据如何转化为xml文件?
- c#如何读取ASP生成的cookie(急)
- DATAGRID中如何及时取消选中的行?这个问题写完了,我就写完我的第一个DATAGRID了
- 乍么判断数据连接是打开的还是关闭的???在线等
- 如何把DataGrid放入ComboBox中
- .net调用win32 dll后需要释放吗?
- WCF 客户端添加服务端的引用(客户端添加契约)
using System.Collections.Generic;
using System.Text; namespace aaa
{
public class UserIntType //加上public 不然不是内部类 无法访问。
{
private string _display; //没什么好说,就定义了2个属性,一个DisplayName ,一个ValueName 怎两个属性只能访问,不能赋值
private int _val; public UserIntType(string display, int val)
{
this._display = display;
this._val = val;
} public string DisplayName
{
get { return this._display; }
} public int ValueName
{
get { return this._val; }
}
}
}
using System.Collections.Generic;
using System.Text; namespace aaa
{
class UserIntType
{
private string _display;
private int _val; public UserIntType(string display, int val)
{
this._display = display; 赋值
this._val = val; 赋值
} //获取_display值
public string DisplayName
{
get { return this._display; }
} //获取_val值
public int ValueName
{
get { return this._val; }
}
}
}
using System.Collections.Generic;
using System.Text; namespace aaa
{
class UserIntType
{
private string _display;
private int _val;
//构造函数初始化内部的私有变量
public UserIntType(string display, int val)
{
this._display = display; 赋值
this._val = val; 赋值
} //使用公有的属性返回 私有的字段数据,外界只能访问DisplayName,不能修改(应为没有给set块)
public string DisplayName
{
get { return this._display; }
} //同上
public int ValueName
{
get { return this._val; }
}
}
}