Answer: All elements in Interface should be public. Therefore, by default all interface elements are public and abstract by default.
Example:
interface IExample{
public void funExample(); //Error: The modifier 'public' is not valid for this item.
string fun2(string strParam1, string strParam2);//no error
}
Asked In: Many Interviews |
Alert Moderator