小编Jet*_*lly的帖子

C#接口设计指南,接口实现接口

在下面的场景中是否有使用接口的设计指南?

可以在DerivedClass或ISomeInterface接口或两者中声明IDescription.3个选择,什么指导方针可以帮助我确定哪个是最好的.

public interface IDescription
{
    String Description { get; }
}

public interface ISomeInterface
{
    String Name { get; }
    String Description { get; }
}

public class DerivedClass : Base, ISomeInterface, IDescription
{
    public String Description { get; private set; }
}
Run Code Online (Sandbox Code Playgroud)

c# interface

0
推荐指数
1
解决办法
562
查看次数

标签 统计

c# ×1

interface ×1