User Tools

Site Tools


codesamples:named_parameters

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
codesamples:named_parameters [2018/05/30 14:34] – created wolfgangriedmanncodesamples:named_parameters [2018/05/30 19:46] (current) wolfgangriedmann
Line 1: Line 1:
-====== Named parameters in the constructor ======+====== Instance initializers in the constructor ======
  
 <code>function Start( ) as void <code>function Start( ) as void
Line 5: Line 5:
   
 oObject := MyClass{}{ MyProp := "Hello X#" } oObject := MyClass{}{ MyProp := "Hello X#" }
-System.Console.WriteLine( oObject:ToString() )+System.Console.WriteLine( oObject:MyProp )
  
 return       return      
Line 16: Line 16:
   
 property MyProp as string auto property MyProp as string auto
-  
-method ToString() as string 
-  
-  return self:MyProp 
   
 end class</code> end class</code>
  
codesamples/named_parameters.1527690893.txt.gz · Last modified: 2018/05/30 14:34 by wolfgangriedmann