Lecture overview -- Keyboard shortcut: 'u'  Previous page: Methods [Section] -- Keyboard shortcut: 'p'  Next page: Local variables in methods -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home  Page 18 : 29
Object-oriented Programming in C#
Data Access, Properties, and Methods
Methods in C#

Properties and indexers are new to most readers. We should be careful, however, not to forget about methods. In most object-oriented programs, most operations will be implemented as methods. In this section of the material we will discuss - and review - the method concept, local variables in methods, and parameter passing modes in C#.

Instances methods in a class C are intended to carry out operations on instances of C

Such operations modify the state of instances of C, and may also extract information from instances of C

 


modifiers return-type method-name(formal-parameter-list){
  statements
}

The syntax of a method in C#