111,131
社区成员
发帖
与我相关
我的任务
分享 public interface IMyInterface
{
void DoSomething();
void DoSomethingelse();
int DoThis { get; }
}
public class MyClass : IMyInterface
{
#region IMyInterface 成员
public void DoSomething()
{
throw new NotImplementedException();
}
void IMyInterface.DoSomethingelse()
{
throw new NotImplementedException();
}
protected int x;
public int DoThis
{
get { return x; }
set { x = value; }
}
#endregion
}
class Program
{
static void Main(string[] args)
{
MyClass m = new MyClass();
m.DoThis = 1;
Console.WriteLine(m.DoThis.ToString());
Console.ReadKey();
}
}