Join Anton Delsink for an in-depth discussion in this video Write test for use case 1, part of Object Oriented Programming with C#.
- [Instructor] Now that we have the user and the post.…Let's build the association necessary…between those two objects and we'll go…to the publish method to do so.…Select the method press F12 or go to definition…and so here I now need to implement…online 13 some association between these two objects.…So to do so, I'll create a collection…and we will add the two objects to the collection…so they are associated I'll remove the constructor,…the default constructor is fine we don't need…to write it out it's automatically generated…and I'll replace it just with a declaration of a dictionary.…
(typing)…Now the dictionary is in a different namespace…control dot using system dot collections dot generic…and we'll have a user associated with a post.…(typing)…I'll call this publish posts.…(typing)…We'll make this a property…(typing)…and instantiate it to the default.…So the published posts collection is a dictionary…of type user in the key and post has the value.…
And so now when the publish method is called,…we can go to published posts…
- Abstract classes
- Processing text with StreamReader
- IEnumerable and yield return
- Windows Forms controls
- Windows Forms with and without the designer
- Adding, organizing, and testing forms
- Creating classes
Skill Level Intermediate
C# Object-Oriented Programming Tips and Trickswith Jesse Freeman58m 39s Intermediate
What you should know1m 10s
1. Theory vs. Practice
2. Examples from .NET
3. Examples from Windows UI
4. Examples from Board Games
5. Examples from the Web
Next steps1m 13s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.