Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C# C# Basics (Retired) Prepare and Plan Program Structure

Justin Ryndak
Justin Ryndak
8,052 Points

Why Method instead of calling them functions?

Is their something deeper to this reason for calling them methods or is terminology just specific to C#?

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there, Justin Ryndak ! This is a great question and something that trips up many. Just as all thumbs are fingers, but not all fingers are thumbs, all methods are functions, but not all functions are methods. A "method" is a function that is defined on a object as opposed to a sort of free-floating function. This is true for object-oriented languages of all types and is not specific to C#. This is something you will likely hear and see many times over and people tend to use them a bit interchangeably although they are not necessarily interchangeable.

All methods are functions. The only difference is semantics. They are functions attached to an object.

Hope this helps! :sparkles:

Justin Ryndak
Justin Ryndak
8,052 Points

This definitely helps! Thanks so much!