摘要: 1.隐式实现的接口
interface IControl
{
void Paint();
}
public class EditBox : IControl
{
public void Paint()
{
Console.WriteLine("Pain method is called!");
}
}
class Test
{
static void Main()
{
EditBox editbox = new EditBox();
editbox.Paint();
((IControl)editbox).Paint();
Console.ReadKey();
}
}
结果:
Pain method is called!
Pain method
阅读全文
张远强 2007-12-27 05:34
发表评论
[小组]
[博问]
[闪存]
文章来源:
http://www.cnblogs.com/dnawo/archive/2007/12/27/1016243.html
转载于:https://www.cnblogs.com/HappyQQ/articles/1017686.html
相关资源:数据结构—成绩单生成器