I have a question regarding interfaces in c#. Currently I am doing an internship and came across the following code:
namespace MyNote
{
public interface INote
{
double Time { get; set; }
String Text { get; }
}
public class Note : INote
{
private double _time;
private String _text;
public Note(double time, String text)
{
_time = time;
_text = text;
}
public double Time
{
get
{
return _time;
}
set
{
_time = value;
}
}
public String Text
{
get
{
return _text;
}
}
}
}
The question: What is the use of this interface? Nobody can answer my question so maybe you guys.