I've notice you have used the public interface as the declaration. Why not private interface?
I'm not entirely sure what you mean. Interfaces must either be public or internal. They can't be private. And members of an interface (methods, properties, etc.) can't be marked with an access modifier, because they are all implicitly public. In fact, that's the very definition of what an interface is: what it exposes to the public/outsiders.
It doesn't really make any sense to talk about private interfaces, and you can't create them in C#. Am I not understanding your question correctly?
Just a note. the tutorial order seems messed up.. I believe 22 should be 24, and 23/24 should be 22/23. if that makes any sense.
In the C# Tutorial List the Order goes
like the following:
20…
21 - Interfaces
22 - Writing to and Reading from Files
23 - Using Generics
24 - Generics
25 - Error Handling: Exceptions
26…
however.. if you use the links Inside the tutorials.. they
go like this:
21 - Interfaces
23 - Using Generics
24 - Generics
22 - Writing to and Reading from Files
25 - Error Handling: Exceptions
I had stopped reading for the day at the end of generics.. and then the next day I looked at the list and went directly to Error Handling and skipped File I/O entirely. I caught this the second time though…
Great catch. I'll have to see what happened. In practice, it shouldn't matter if you do generics or file I/O first. (You could also do one and not the other or neither, and not be totally useless, but they're both great things to know eventually.) I suspect I just changed my mind at some point on what the preferred order should be. I'll also take a look back in my book and see what order I did it there…
If you follow the tutorials from the main page, you'll get files before generics. If you follow the internal links, you'll get generics before files. Either should be perfectly fine, but it looks like you got caught in the odd situation where you missed stuff because of the disconnect.
I'm actually working on some things behind the scenes to fix problems like this. (For instance, with the new Mercurial tutorials, this kind of problem should be impossible to actually occur.) But it will take time to switch everything over. I'll probably just make the manual edit now, and let the more sophisticated behind-the-scenes fix come at a later time.
Alright Cool. Thanks.. I think from now on ill post any Catches or whatever on the troubleshooting page of the tutorial.
That would be awesome. I don't catch all possible problems, and I'm certain that not everyone who notices a problem says something. I always appreciate it when somebody points out the problem so I can fix it. The troubleshooting page is a perfectly fine place to post it. (As would be the forum, a private message, an email, Twitter, or my User Voice page. Sheesh. I had no idea I had so many channels.)