编程语言
首页 > 编程语言> > C# 接口

C# 接口

作者:互联网

原文链接:https://my.oschina.net/u/2296689/blog/545745
{
// methods
// properties
// indexers
// events
}

看看C# 几口的定义  比起java 的却是要麻烦些  不过概念还是一样的

C#  构造函数重载

public class WebSite
{
string siteName;
string url;
string description;
// Constructors
public WebSite()
: this(“No Site”, “no.url”, “No Description”) {}
public WebSite(string newSite)
: this(newSite, “no.url”, “No Description”) {}
public WebSite(string newSite, string newURL)
: this(newSite, newURL, “No Description”) {}
public WebSite(string newSite,
string newURL,
string newDesc)
{
siteName    = newSite;
url         = newURL;
description = newDesc;
}
}

转载于:https://my.oschina.net/u/2296689/blog/545745

标签:WebSite,newURL,string,No,C#,接口,newSite,public
来源: https://blog.csdn.net/chuoxieai9700/article/details/100904912