July 2015
Intermediate to advanced
1300 pages
87h 27m
English
A method is a member that performs an operation. Methods are of two kinds: Sub (which does not return values) and Function (which returns a value). The following are minimal examples of methods:
Sub DoSomething() If IO.File.Exists("C:\SomeFile.txt") = False Then Throw New IO.FileNotFoundException Else Console.WriteLine("The file exists") End IfEnd SubFunction DoSomethingElse() As Boolean Dim result As Boolean = IO.File.Exists("C:\SomeFile.txt") Return resultEnd Function
This book makes intensive use of methods, so detailed descriptions on implementations are provided across chapters.
Scope
Methods’ visibility within types can be assigned using one of the ...