About 156,000 results
Open links in new tab
  1. What's the difference between a method and a function?

    Oct 1, 2008 · A method is on an object or is static in class. A function is independent of any object (and outside of any class). For Java and C#, there are only methods. For C, there are only …

  2. Method vs Functions, and other questions - Stack Overflow

    Mar 8, 2013 · Definition of a method: A method is a property of an object that is a function. Methods are defined the way normal functions are defined, except that they have to be …

  3. c# - Difference between Method and Function? - Stack Overflow

    Sep 4, 2012 · Function is the process-oriented name, method the OO name. Since C# (and VB.NET) are object oriented languages you should use method.

  4. In C++, what is the difference between a method and a function

    The term "Method" is not used in c++, but rather member function. If you are thinking about the difference between a procedure and a function then the difference in c++ is none.

  5. What is a difference between a method and a function?

    Jan 30, 2011 · In one line, a method is a function but a function is not necessarily a method. The difference is that a method is used to describe functions defined in classes that are used with …

  6. In Python, when should I use a function instead of a method?

    The Zen of Python states that there should only be one way to do things- yet frequently I run into the problem of deciding when to use a function versus when to use a method. Let's take a trivial

  7. javascript - Are 'Arrow Functions' and 'Functions' equivalent ...

    If a function is constructable, it can be called with new, i.e. new User(). If a function is callable, it can be called without new (i.e. normal function call). Functions created through function …

  8. Java's methods vs. functions - Stack Overflow

    function = static method (class wide method), without side effect. In contrast to non-static method which may alter fields of the object. Just because of the respect for the clean 'function' a new …

  9. Difference between function, method, routine, procedure, …

    Jul 5, 2021 · A function is usually expected to return an output; a procedure, on the other hand, is expected to perform an operation with side-effects. For instance, a function which displays its …

  10. Python method vs function - Stack Overflow

    I am seeking for a confirmation if my thinking is correct in terms of Python method vs function: A method is a part of a class. A function is defined outside of a class. so e.g. class FooBar(ob...