+ 4

Functions VS Methods

What is the difference between a function (like in Python) and a method (like we have here, in C#)? Thank you for the help ;)

1st Aug 2016, 10:12 AM
Aidar Sadykov
Aidar Sadykov - avatar
4 ответов
+ 7
Function if a piece of code you can call. Method is a function that is a member of some class.
2nd Aug 2016, 1:09 AM
Ellie Wright
Ellie Wright - avatar
0
If I am correct here, the only difference is the way it's named.
1st Aug 2016, 11:38 AM
Andreas BeEm Kvist
Andreas BeEm Kvist - avatar
0
No difference, "method" in C# and Java is "function" in C, C++ and other languages, but they are exactly the same
1st Sep 2016, 10:57 PM
Leon Tory Walker
Leon Tory Walker - avatar
- 2
Actually method is a group of statement. that performed a specific tasks. but function also made and done a specific tasks. for me it's works same. but code well be different.
11th Aug 2016, 9:27 PM
ikram khan
ikram khan - avatar