这是一个非常基本的问题。get set property as a bool [] return
void Output(int output);
- >此使得一个单一输出
bool[] Outputs { get; set; }
- >这使得多个输出。我需要实施这个。这是一个声明为接口的API。
在我的课程中,我需要使用它。
我研究了这个http://msdn.microsoft.com/en-us/library/87d83y5b%28VS.80%29.aspx ...但没有我得到和设置返回一个布尔数组的引用。
在上述连杆中,类是:
接口IPOINT { //属性签名: INT X { GET; 集; } int y { get; 集; }}
class Point : IPoint
{
// Fields:
private int _x;
private int _y;
// Constructor:
public Point(int x, int y)
{
_x = x;
_y = y;
}
// Property implementation:
public int x
{
get
{
return _x;
}
set
{
_x = value;
}
}
public int y
{
get
{
return _y;
}
set
{
_y = value;
}
}
}
这将是在我的案件类的声明?
感谢您的答复Vinay。 public interface myInterface bool [] Outputs {get;组; } void Output(int output); } class myClass:Form - >这里我需要使用myInterface。 但myClass继承了Form。那么这里会是什么情况? ? – SLp 2010-08-16 10:41:16
您可以从一个类和多个接口继承。所以只需在表单之后添加命令和接口名称即可。 (myClass:Form,IMyInterface) – VinayC 2010-08-16 11:18:03