c# - Difference between function and method -
this question has answer here:
- difference between method , function 26 answers
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
Post a Comment