To use the 'I' prefix for interfaces or not to

前端 未结 20 1467
长情又很酷
长情又很酷 2021-02-01 02:54

That is the question? So how big a sin is it not to use this convention when developing a c# project? This convention is widely used in the .NET class library. However, I am not

20条回答
  •  悲&欢浪女
    2021-02-01 03:50

    The difference between Java and C# is that Java allows you to easily distinguish whether you implement an interface or extend a class since it has the corresponding keywords implements and extends.

    As C# only has the : to express either an implementation or extension, I recommend following the standard and put an I before an interface's name.

提交回复
热议问题