首先,我要创建一个抽象基类,用于表示我们要公开的服务。
To begin we create an abstract base class which represents the service we want to expose.
我想把性能的公共元素提取到一个抽象基类。
I'll want to extract the common elements of performance into an abstract base class.
用这个例子,我创建了一个处理属性改变事件的基类。
With this example, I created a base class to handle the property changed events.
我对编译器进行了设置,所以我必须指定override注释,以便指明哪些方法要覆盖基类的方法。
I set up the compiler so I have to specify the override annotation so as to clarify which methods are overriding base class methods.
我将首先创建一个基类,用于容纳entity对象的一个实例。
I'll start by creating a base class that holds an instance of an Entity object.
现在的问题是,我只能捕获基类这个异常。
在我结束对类型大小调整的讨论之前,我还希望提一下基类。
Before I conclude the discussion of the sizing of types, I also want to mention base classes.
我上面概述的这些类型的内容定制场景不仅对按钮控件有效,同样地对其他继承自ContentControl基类的其他控件也工作。
These types of content customization scenarios I outlined above work not just for Button controls, but likewise for all other controls that derive from the ContentControl base class.
我如何使用初始化列表的基类?
我如何调用基类的方法从另一个方法时,它的重写?
How do I call a base class's own method from another method when it's overridden?
我有一个基类。我怎么叫正确的派生类的正确方法?
I have a base class. How do I call the right method for the right derived class?
现在,我米要调用基类的构造函数,而不是成员函数虚函数。
Now Im going to call virtual function from constructor of Base class rather than member function.
每一个项目,我只是从该基类的字体名称,创建一个名为字体对象,我绘制文本,恢复以前的字体,瞧。
Each item and I just retrieve the font name from the base class, create a font object with the name, I draw the text, restore the previous font and voila.
给定一个基类我如何找到最专业的子类吗?
Given a base class how do I find the most specialized subclasses of it?
派生类的构造函数基类指针,我怎么指向基类的指针?
For a derived class with a constructor that takes a base class pointer, how do I refer to the base class pointer?
我如何在派生类中重写基类的属性字段?
How do I override a field in a base class with a property in a derived class?
这里的问题……为什么我不能写一个隐式操作符从基类派生类在c#中?。
The question here… Why can't I write an implicit operator from a Base class to a Derived class in C#?
如果我有一个对象的指针,转换到它的基类指针对象上,我能通过基类指针调用合适的成员函数。
If I have a pointer to an object cast to one of its base classes, I can call the correct member functions through the abstract base class.
我决定写个通用基类,把任何常用的需要的方法放到基类里。
I decided to give all my CEdit-derived classes a common base class for any common methods they may need.
我决定写个通用基类,把任何常用的需要的方法放到基类里。
I decided to give all my CEdit-derived classes a common base class for any common methods they may need.
应用推荐