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
The IndexOutOfRangeException is the array's way of telling us that we've tried to get or set an index that doesn't exist in the array. This is easily avoided.
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
which means no other
classes can access it, but
0:00
other classes still need to get
some information about the path.
0:02
For example as an invader comes
down the path we need to know
0:05
where on the map it is moved to so that we
can determine if it's in range of a tower.
0:09
Let's add a method to the path
class the returns a map location.
0:14
We'll call it, get location at.
0:19
It will take as a parameter the number
of steps down the path they are.
0:21
We'll call this parameter path step.
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