Why prefix C# interface names with an “I”

前端 未结 18 1802
清歌不尽
清歌不尽 2021-02-01 03:13

What is the rationale behind this naming convention?

I don\'t see any benefit. The extra prefix just pollutes the API.

My thinking is inline with Konrad\'s respo

18条回答
  •  無奈伤痛
    2021-02-01 03:42

    I seems to traditional convention from Hungarian Notation. Interface Naming Guidelines says "Prefix interface names with the letter I, to indicate that the type is an interface." Framework Design Guidelines also says "DO prefix interface names with the letter I, to indicate that the type is an interface."

    It is just a coding convention, So it's to hard to determine good or bad. Important things is consistency.

提交回复
热议问题