C#提示不实现接口成员
程序代码:
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { public interface ImyInterface { string STR { set; get; } void OutMethod(); } public class Inherit : ImyInterface { string str = "Hello world"; public string STR { get { return str; } set { str = value; } } public void outMethod() { Console.WriteLine("sdaczx"); } } public class Program { public static int Main(string[] args) { Inherit sd = new Inherit(); sd.outMethod(); // Console.WriteLine(sd.STR); return 0; } } }