c# - Difference between function and method -


this question has answer here:

what difference between function , method ?
can 1 suitable example ?
, differences ?where routines called function , called method ?
in advance

function or method named callable piece of code performs operations , optionally returns value.

in c language term function used. java & c# people call these methods (and function in case defined within class/object).

a c++ programmer might call function or method (depending on if writing procedural style c++ code or doing object oriented way of c++).

call function calling it's name result = mysum(num1, num2); call method referencing object first

result = mycalc.mysum(num1,num2); 

check link in cubanazucy's answer. discussed in great detail on stack overflow.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -