Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed C# Objects!
You have completed C# Objects!
Preview
Encapsulation with properties allows us to change how object's attributes are implemented behind the scenes.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
that are identical to each other here.
0:00
A common saying coders use
is keep your code dry.
0:02
Dry stands for don't repeat yourself.
0:05
Having duplicate or
0:08
even similar code like this is one
example of what's known as a code smell.
0:09
A code smell is something in the code that
indicates that there's a potential problem
0:14
with how the software is designed.
0:18
Let's look at why having these
duplicate lines might be a problem for
0:20
us and then see how we can fix it.
0:23
Let's take a closer look at these lines.
0:26
In both lines,
0:28
the location property is being set to the
location on the path at this _pathStep.
0:29
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up