You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
- The I stands for...ready..."Interface"Ed Swangren– Ed Swangren2009-03-18 21:02:04 +00:00Commented Mar 18, 2009 at 21:02
- 1Yes, and that is quite obvious. The real question is, why would anyone care if they're using interfaces, abstract classes or concrete classes? Does it matter to you if you accept an ICustomerService or a CCustomerService in the CTOR of your object?Magnus– Magnus2009-03-19 06:56:00 +00:00Commented Mar 19, 2009 at 6:56
- It's just convention. Makes it easy to find the interface as well. I have tried removing it and I didn't really like it as some concrete classes were named the same ICustomerService and CustomerService, if you drop the I then they are the same. I don't want to have to think about naming it more cleverly, I just want to move on with the code.rball– rball2009-11-20 23:51:37 +00:00Commented Nov 20, 2009 at 23:51
- For the reason behind the I-prefix, see (for example) Interface naming convention on StackOverflow: which quotes Brad Abrams: "...the 'I' prefix on interfaces is a clear recognition of the influence of COM (and Java) on the .NET Framework"Wai Ha Lee– Wai Ha Lee2015-01-21 15:35:25 +00:00Commented Jan 21, 2015 at 15:35
- @Magnus "Does it matter to you if you accept an ICustomerService or a CCustomerService in the CTOR of your object?" Absolutely it does! In OOP you should "program to an interface, not an implementation." The "I" prefix easily lets you distinguish between interfaces and implementations, so you can ensure you're not accidentally specifying concrete parameters in your class constructors.Tagc– Tagc2017-08-09 13:42:21 +00:00Commented Aug 9, 2017 at 13:42
Add a comment |
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. python-3.x), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you
lang-cs