📄 class1.cs
字号:
using System;
namespace AssociateUse
{
interface NameBase
{
void GetName(int i);
}
interface NameA:NameBase
{}
interface NameB:NameBase
{}
class Name:NameA, NameB
{
private int id;
public Name()
{
}
public Name(int id)
{
this.id = id;
}
public void GetName(int i)
{
if (i==0)
Console.WriteLine("This is a Name");
}
public int GetId()
{
return id;
}
}
class MyName
{
//private Name theName;
//private string name;
public MyName()
{
}
public void GetName(int i)
{
NameA theName = (NameA)new Name();
//if (theName is NameA)
theName.GetName(i);
}
}
class Test
{
public static void Main()
{
MyName myName = new MyName();
myName.GetName(0);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -