Naming Convention for Interfaces

Not sure if this is the best place to post this but in the C# lesson Secure Munchester United, the interface TeamSupport should be prefixed with an I (ITeamSupport.

cc @ErikSchierboom

I had a quick look at the exercise and the wider track.

It looks like a mistake that should be corrected. C# default style has this nod towards hungarian notation, and even though personally I would much rather ignore it, I think we should change it to make it consistent with the track and the default style.

It might be a good opportunity for a first contribution to the track for somebody. Alternatively, I’d be happy to do it.

I know I’m jumping in here before @ErikSchierboom, but considering all our discussions about changing the exercises to make them more idiomatic in the truck, my guess is that we should make the change.

I agree with the change, as prefixing interfaces with an I is in the official naming conventions: C# identifier names - rules and conventions - C# | Microsoft Learn

Original poster here. Does this course even discuss naming conventions in general and naming conventions in C#?

Not specifically. We probably should add a link in somewhere.

This link discusses identifiers: Microsoft C# Identifier Naming Conventions

This link discusses coding conventions: Microsoft C# Coding Conventions

Although I find it amazing some businesses don’t always follow a naming convention.

1 Like