Why prefix C# interface names with an “I”

前端 未结 18 1572
清歌不尽
清歌不尽 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:55

    If you consider the two "best-practice-aphorisms"

    clarity is king

    and

    noise is bad

    there is a conflict between these. The question is: when does clarity become noise?

    For me it more noisy (but equally clear) to write Person person = new PersonImpl() than IPerson person = new Person().

提交回复
热议问题