Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

Justin Ryndak
Justin Ryndak
7,634 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
7,634 Points

This definitely helps! Thanks so much!