文章输出错误(C#中的接口(面向初学者))? [英] Error in an output of article (Interfaces in C# (For Beginners)) ?
问题描述
大家好
URL链接:-" C#接口(适用于初学者)"
P6.CS
类Demo:abc
{
公共静态void Main()
{
System.Console.WriteLine("Hello Interfaces");
xyz();
}
公共无效xyz()
{
System.Console.WriteLine("In xyz");
}
}
界面abc
{
void xyz();
}
每篇文章的输出AS
```````````````
Hello接口
在xyz
但是编译时的实际输出
```````````````````````````````
非静态字段,方法或属性"ConsoleApplication1.Program.xyz()"需要对象引用"
由于我没有在文章评论中得到答复,所以我会发布问题
在这里.
any1可以在这个问题上为我提供帮助吗?
在此先感谢
Naveen ...
Hi all
URL Link : - "Interfaces in C# (For Beginners)"
P6.CS
class Demo : abc
{
public static void Main()
{
System.Console.WriteLine("Hello Interfaces");
xyz();
}
public void xyz()
{
System.Console.WriteLine("In xyz");
}
}
interface abc
{
void xyz();
}
Output AS per article
`````````````````````
Hello Interfaces
In xyz
But Actual Output When compiling
`````````````````````````````````
"An object reference is required for the non-static field, method, or property ''ConsoleApplication1.Program.xyz()''"
Since i dint get a reply in the article comments ,iam posting question
here.
Can any1 help me on this issue ???
Thanks in advance
Naveen...
推荐答案
您只在第二天问过:学会耐心:也许作者去周末或度假.
You only asked the other day: learn to be patient: maybe the author was away for the weekend or on vacation.
我建议您使用本文结尾处的论坛,以吸引作者并快速获得答复.很少您会找到阅读此论坛的作者.
请在文章的消息论坛中发布相同的内容.
I would suggest you to please use the forum present at the end of the article in order to reach author and get quick response. Rarely you will find authors reading this forum.
Please post the same at the article''s message forum.
这篇关于文章输出错误(C#中的接口(面向初学者))?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!