I was searching on Google about the difference between Method and function and I got two answers.
Answer -1
Method is non return type like below
void Method()
{
}
Where as Function is a return type like below
int Method()
{
}
Answer – 2
There is no difference between these two terms.
Query – Which is correct or there is any third thing?
In .NET the terms are pretty much synonymous, but in languages such as JavaScript, they may have slightly different meanings. An (js terminology) example would be how methods are typically object properties that contain functions.
You may also here the differences stated as functions are meant to be stand alone units of functionality whereas methods are defined as members of a class. In. NET, you will usually hear the term ‘method’ used more often than ‘function’ (however they do have, aptly named, ‘anonymous functions’).
There is another question on here regarding function and method differences that you may want to look at for additional detail.