0

I have an interface defined as:

interface IProperty<T>
{
    public T Value { get;  set; }

    public T GetTheValue()
    {
        return (T)(Value);
    }
}

An implementation as:

class Animal : IProperty<string>
{
    public string Value { get;  set; }
}

Used as:

var camel = new Animal { Value = "Camel" };

How can instances of the Animal class access the GetTheValue() method in the IProperty<T> interface? (Nothing is showing up in IntelliSense)

And if it cannot, what is the purpose of methods with a body in the Interface?

Rowan Smith
  • 1,815
  • 15
  • 29

0 Answers0