C# - Prefixing interfaces

+1 vote
asked Apr 9, 2015 in Programming by Wizard81 Student (240 points)
Hi,

I am new to c# and want to know if I need to prefix all interfaces with an 'I'? Per example IList.

1 Answer

+2 votes
answered Apr 9, 2015 by ismix Senior (1,150 points)
selected Apr 11, 2015 by Wizard81
 
Best answer
The I-prefix is recommended for interfaces. This way you are able to identify an interface by the name. But it's just a convention there's no syntax rule describing this. But I would highly rcommend doing so.
commented Apr 9, 2015 by Bugstacker Senior (4,800 points)
In a programming language that does not distinguish between 'extends' and 'implements' with keywords (like in java) it's recommended to prefixing with an 'I'. Otherwise you don't see any difference by just viewing the code.
Welcome to Bugstacker Q&A, where you can ask questions concerning Game Development, Programming and Design and receive answers from other members of the community.

Help for

...