Hello There, Guest!
View New Posts  |  View Today's Posts
Anyone have any insight on this?

  • 0 Vote(s) - 0 Average

01-21-2016, 03:12 PM #1
Junior Member
Posts: 5 Threads:3 Joined: Jan 2016 Reputation: 0

Anyone have any insight on this?
Hey Everyone,
I was wondering if any of you guys had enough time to look at this and maybe share some insight or at least vote it up for me. Thanks a ton! http://programmers.stackexchange.com/que...tions-in-c
- Neckbeard wannabe

01-23-2016, 02:35 PM #2
Posts: 9,733 Threads:1,026 Joined: Jun 2011 Reputation: 76

RE: Anyone have any insight on this?
I do have some insight that I can provide. First, about your classes, since the name of an institution should probably remian the same and not change, upon instantiation is the only time that you should allow external implementation to modify that string for the Name. This would be proper encapsulation; a getter which is publicly accessible and any setter functionality as private. Same principle applies to other fields within other classes. Additionally, overriding the ToString() method for user-defined objects is usually always fairly useful in cases where the object has a string representation.

Keep in mind, you can also create your own collection types by implementing a class that implements IList<T> or ICollection<T> for instance, among other interfaces. If you want your object to be enumerable via a foreach loop then consider IEnumerable<T> as well.

As for the naming conventions, there are .NET naming conventions that you might want to follow and make part of your habit from MSDN. Typically locals use camelCase rather than PascalCase.

edit: Posted my response.
This post was last modified: 01-23-2016, 02:55 PM by AceInfinity.

Microsoft MVP .NET Programming - (2012 - Present)
®Crestron DMC-T Certified Automation Programmer

Development Site: aceinfinity.net

 ▲ ▲

Forum Jump:

Users browsing this thread: 1 Guest(s)