Does not implement interface member issues

前端 未结 1 1471
眼角桃花
眼角桃花 2020-12-19 14:17

I have:

public interface ITest
{
    string test { get; set; }
}

And

[DataContract]
public class TestGeneric : ITest
{
             


        
相关标签:
1条回答
  • 2020-12-19 14:31

    You have created a field, as you omitted the { get; set; } accessors that make a member a property.

    The implementation must match the interface exactly, so add those accessors:

    public class TestGeneric : ITest
    {
        public string Test { get; set; }
    }
    
    0 讨论(0)
提交回复
热议问题