新手学习 敬候佳音
解决方案 »
- 页面中 动态内容静态化。
- 为什么子类可以继承父类的private的成员,但是不可以直接访问?
- 我有一道算法题,谁能准确得出答案的给分
- 大侠们,帮忙解决下,gridview,对查询出的数据非原样输出(有个逻辑判断),自定义分页如何实现啊???谢谢哦
- 关于在C/S系统中使用WebService作为中间件访问数据库的疑问
- 求C#高级编程第二版一书源码
- 如何让子窗体调用主窗体的数据库连接?
- c++问题请教!怎样把字符串中的汉字写到unsigned short ss[20]中啊
- 问几个TreeView的问题,谢谢。
- datagrid里面怎么让选中的整行颜色改变?
- 我要收购你
- 改写dll文件中的某个属性值
public abstract class AttachmentParserBase
{
protected Stream m_OutputStream = null;
protected StreamReader m_Reader = null;
protected string m_EndBoundary = string.Empty;
protected VirtualLogUtil m_logger = null;
protected string m_BufferStr = string.Empty;
public AttachmentParserBase(StreamReader input, Stream output, string boundary)
{
m_Reader = input;
m_OutputStream = output;
m_EndBoundary = boundary;
}
{
Dictionary<string, object> dictionary;
public Permission()
{
this.dictionary = new Dictionary<string, object>();
}
}
8楼正解,抽象类是允许定义构造函数的,不过一般都是用来在子类实例化的时候调用,带参的要在子类利用base显式调用,所以,一般建议设置成protected的
public abstract class Permission
{
Dictionary <string, object> dictionary;
protected Permission()
{
this.dictionary = new Dictionary <string, object>();
} protected Permission(string str)
{ }
}public class AA:Permission
{
public AA(){}
public AA(string str):base(str)
{
}
}
但抽象类是不能new的.