I have a question while studying C#. When I declare the interface, I usually declare it like the code below
public interface IRequireInitialization
{
void Init();
}
public class TESTManager : IRequireInitialization
{
public void Init(){ throw new NotImplementedException(); }
}
but my friend said that I should add abstract before the declaration of the interface member function. I didn't feel any big difference in implementing the interface, what's the difference? And if there is a difference, when should I use it?
public interface IRequireInitialization
{
abstract void Init();
}
public class TESTManager : IRequireInitialization
{
public void Init(){ throw new NotImplementedException(); }
}