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
Some methods return the result of their work as a return value.
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
Then the value stored in
the inBounds variable is returned.
0:00
So if point is found to be inside
the boundaries of the map,
0:05
then the inBounds variable will be true.
0:08
And the value true will be returned
from this method to the caller.
0:10
Otherwise, if the point was found to
be outside the boundaries of the map,
0:15
this method will return false.
0:18
I should mention that we can
actually shorten this code a bit and
0:21
avoid using the inBounds
variable entirely.
0:23
The way we can do this is to return
the result of this expression right away.
0:27
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