110,534
社区成员
发帖
与我相关
我的任务
分享
using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
public class TestFrm
{
public void Main()
{
TestFrm f = new TestFrm();
ITest1 t1 = f;
Debug.Print(t1.strPrint1);
ITest2 t2 = f;
Debug.Print(t2.strPrint2);
}
}
public class TestClass : ITest1, ITest2
{
private string _strPrint1 = "Test1";
private string strPrint1 {
get { return _strPrint1; }
set { _strPrint1 = value; }
}
private string _strPrint2 = "Test2";
private string strPrint2 {
get { return _strPrint2; }
set { _strPrint2 = value; }
}
}
public interface ITest1
{
string strPrint1 { get; set; }
}
public interface ITest2
{
string strPrint2 { get; set; }
}
using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
public class TestFrm
{
public void Main()
{
TestClass f = new TestClass();
ITest1 t1 = f;
Debug.Print(t1.strPrint1);
ITest2 t2 = f;
Debug.Print(t2.strPrint2);
}
}
public class TestClass : ITest1, ITest2
{
private string _strPrint1 = "Test1";
private string strPrint1 {
get { return _strPrint1; }
set { _strPrint1 = value; }
}
private string _strPrint2 = "Test2";
private string strPrint2 {
get { return _strPrint2; }
set { _strPrint2 = value; }
}
}
public interface ITest1
{
string strPrint1 { get; set; }
}
public interface ITest2
{
string strPrint2 { get; set; }
}