User Tools

Site Tools


everything_object

Differences

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

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
everything_object [2018/01/28 16:55] – created wolfgangriedmanneverything_object [2018/08/20 04:03] wolfgangriedmann
Line 4: Line 4:
  
 This means that even these datatypes can (an have) own methods. A method that every object has, is the ''AsString()'' method. This method sometimes returns useful data: This means that even these datatypes can (an have) own methods. A method that every object has, is the ''AsString()'' method. This method sometimes returns useful data:
-<code>local nInt as int+<code visualfoxpro>local nInt as int 
 +local oDate as DateTime 
 +local lLogic as logic
  
 nInt := 1234 nInt := 1234
-System.Console.WriteLine( nInt:ToString() )</code> +oDate := DateTime.Now 
-returns<code>12345 +lLogic := true 
-28.01.2018 17:51:37</code>+System.Console.WriteLine( nInt:ToString() ) 
 +System.Console.WriteLine( oDate:ToString() ) 
 +System.Console.WriteLine( lLogic:ToString() )</code> 
 +returns<code visualfoxpro>12345 
 +28.01.2018 17:51:37 
 +true</code>
  
 But sometimes, in more complex classes, the ''ToString()'' method returns only the name of the class, and it is to you to define such a method that returns a more meaningful string value. But sometimes, in more complex classes, the ''ToString()'' method returns only the name of the class, and it is to you to define such a method that returns a more meaningful string value.
everything_object.txt · Last modified: 2020/06/14 22:55 by joecurran