Click here to Skip to main content
15,888,280 members
Home / Discussions / C#
   

C#

 
AnswerRe: tabbed forms with identical content. Pin
Henry Minute10-Jul-09 11:24
Henry Minute10-Jul-09 11:24 
QuestionDifference between Methods and Functions? Pin
Rajdeep.NET10-Jul-09 8:46
Rajdeep.NET10-Jul-09 8:46 
AnswerRe: Difference between Methods and Functions? Pin
Blue_Boy10-Jul-09 8:50
Blue_Boy10-Jul-09 8:50 
AnswerRe: Difference between Methods and Functions? Pin
0x3c010-Jul-09 9:03
0x3c010-Jul-09 9:03 
GeneralRe: Difference between Methods and Functions? Pin
Rajdeep.NET10-Jul-09 9:19
Rajdeep.NET10-Jul-09 9:19 
GeneralRe: Difference between Methods and Functions? Pin
0x3c010-Jul-09 9:43
0x3c010-Jul-09 9:43 
GeneralRe: Difference between Methods and Functions? Pin
PIEBALDconsult10-Jul-09 13:44
mvePIEBALDconsult10-Jul-09 13:44 
AnswerRe: Difference between Methods and Functions? Pin
PIEBALDconsult10-Jul-09 9:19
mvePIEBALDconsult10-Jul-09 9:19 
They are really just terms for the same thing, but...

Pascal makes the following distinction:

A function returns a value, and does not alter the parameters (if any) -- x = ABS(y)

A procedure does not return a value, but does alter the parameters -- CLOSE(f)


C (and its descendants) don't really make that distinction, so a function may alter the parameter and return a value -- e = CLOSE(f)


** Although allowed by the language, many practitioners frown on "functions" that have "side-effects", regardless of the language in use. **


With Object Oriented Programming, functions that are part of a class (or struct) are called methods.

Unlike C++, C# enforces OOP so all functions must be part of a class, and are therefore methods.

If you choose, you may write methods that conform to the above definition of "function" or "procedure"
Likewise, in C# some methods are properties, some are indexers, etc.
GeneralRe: Difference between Methods and Functions? Pin
harold aptroot10-Jul-09 10:04
harold aptroot10-Jul-09 10:04 
GeneralRe: Difference between Methods and Functions? Pin
DaveyM6910-Jul-09 11:26
professionalDaveyM6910-Jul-09 11:26 
GeneralRe: Difference between Methods and Functions? Pin
PIEBALDconsult10-Jul-09 13:49
mvePIEBALDconsult10-Jul-09 13:49 
GeneralRe: Difference between Methods and Functions? Pin
harold aptroot10-Jul-09 14:12
harold aptroot10-Jul-09 14:12 
GeneralRe: Difference between Methods and Functions? Pin
PIEBALDconsult10-Jul-09 17:57
mvePIEBALDconsult10-Jul-09 17:57 
GeneralRe: Difference between Methods and Functions? Pin
Luc Pattyn10-Jul-09 13:22
sitebuilderLuc Pattyn10-Jul-09 13:22 
GeneralRe: Difference between Methods and Functions? Pin
PIEBALDconsult10-Jul-09 13:46
mvePIEBALDconsult10-Jul-09 13:46 
AnswerRe: Difference between Methods and Functions? Pin
Alan Balkany13-Jul-09 4:23
Alan Balkany13-Jul-09 4:23 
QuestionDataGridView add row performance Pin
Dan Neely10-Jul-09 8:45
Dan Neely10-Jul-09 8:45 
QuestionIVR Pin
kenant10-Jul-09 8:05
kenant10-Jul-09 8:05 
QuestionRe: IVR Pin
harold aptroot10-Jul-09 8:07
harold aptroot10-Jul-09 8:07 
AnswerRe: IVR Pin
Dr.Walt Fair, PE10-Jul-09 10:36
professionalDr.Walt Fair, PE10-Jul-09 10:36 
QuestionGnuPG / GnuPGWrapper from C# Pin
davidmgray_de10-Jul-09 5:09
davidmgray_de10-Jul-09 5:09 
AnswerRe: GnuPG / GnuPGWrapper from C# Pin
MumbleB10-Jul-09 6:57
MumbleB10-Jul-09 6:57 
QuestionRegex.Remove Pin
Wheels01210-Jul-09 5:07
Wheels01210-Jul-09 5:07 
AnswerRe: Regex.Remove Pin
riced10-Jul-09 5:26
riced10-Jul-09 5:26 
GeneralRe: Regex.Remove Pin
Wheels01210-Jul-09 5:29
Wheels01210-Jul-09 5:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.