+ 2
[SOLVED] What is the difference between Methods and Functions in C#?
The title explains everything. Iâm just confused because they seems the same but I still donât understand where is the difference. Maybe people use to call one when return a value and the other when return to nothing, but at the end they are the same concept?! Thx
5 Answers
+ 3
when a function is part of class, its called a method.
C# is an OOP language and doesnât have functions that are declared outside of classes, thatâs why all functions in C# are actually methods.
Beside this formal difference, they are the same.
C# prefers the term âmethodâ over â functionâ
+ 1
Thx so much guys!!
Both answer are awesome!!