Wiki

Changes between Version 3 and Version 4 of Delegates

Show
Ignore:
Timestamp:
11/07/12 13:25:43 (11 years ago)
Author:
hopscc
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Delegates

    v3 v4  
    1 = Delegates =  
     1= Delegates and Signatures =  
    22 
    3 (also known as typesafe (function) method pointers). 
     3(These are also known as typesafe (function) method pointers). 
    44 
    5 A delegate is a type that safely encapsulates a method of a specific signature 
     5A '''delegate''' is a type that safely encapsulates a method of a specific signature 
    66(method return type and parameters).  
    77 
     
    1010 
    1111Once a delegate is assigned a method, it behaves exactly like that method  
    12 and can be used like any other method, with parameters and  
     12and can be used like any other method, i.e called with parameters and giving  
    1313a return value. 
    1414 
    1515The type of a delegate is defined by the name of the delegate.  
    1616 
    17 In cobra, delegates are declared as "method signatures" and define a type: 
     17In cobra, delegates are declared as a "method '''signature'''" and define a type:[[BR]] 
     18 
    1819e.g  
    1920{{{