Interface names start with I Whenever you create an interface, you should make its name start with an uppercase I. There’s no rule that says you need to do it, but it makes your code a lot easier to understand. You can see for yourself just how much easier that can make your life. Just go into the IDE to any blank line inside any method
and type “I”—IntelliSense shows .NET interfaces.
interface IStingPatrol
{
int AlertLevel { get;}
int StingerLength { get; set;}
bool LookForEnemies();
int SharpenStinger(int length);
}
When you mark a class abstract, C# won’t let you write
code to instantiate it. It’s a lot like an interface—it acts like a
template for the classes that inherit from it.
abstract class abc{}
Comments
Post a Comment