【发布时间】:2015-08-29 15:38:17
【问题描述】:
谁能解释下面的代码,谁能用下面的代码sn-ps给出一些实时的解释
public interface roman
{
roman this[string name] { get; }
}
public class notempty : roman
{
public string Color{ get; set; }
public roman this[string name]
{
get { return new notempty() { Color= "Value1" }; }
}
}
【问题讨论】:
-
如果你能解释一下你懂哪些不懂的地方会有所帮助
-
实时解释?你想电话会议吗?
-
我建议你阅读这篇文章.. stackoverflow.com/questions/2697783/…
-
我可以告诉你,该 sn-p 中的大部分内容不符合命名约定。类名、构造函数、方法和公共属性必须使用 PascalCasing。除此之外,您还有一个派生自接口的类,这是非常基本的东西。
-
@MatteoMosca 必须是一个非常强烈的词。