C Sharp to Boo

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "Finding the difference in C# and Boo can be trying at the best of times. So hopefully there is something here to help you use Boo. Variable definition: var1 as int var2 as i...")
 
Line 3: Line 3:
 
Variable definition:
 
Variable definition:
  
var1 as int
+
:var1 as int
var2 as int = 2
+
:var2 as int = 2
var3 as single = 1.0 # single precision floating point number
+
:var3 as single = 1.0 # single precision floating point number
var4 as double = 2.2342352 # double precision floating point number
+
:var4 as double = 2.2342352 # double precision floating point number
  
Collections:
+
Collections:
 
+
 
# Lists
+
<nowiki># Lists</nowiki> 
myList1 as List
+
:myList1 as List
myList2 as List = List() # instantiates new List object
+
:myList2 as List = List() # instantiates new List object
myList3 as List = List(1, 2, 3)
+
:myList3 as List = List(1, 2, 3)
 
+
 
myList.Add(4)
+
:myList.Add(4)

Revision as of 03:08, 12 January 2013

Finding the difference in C# and Boo can be trying at the best of times. So hopefully there is something here to help you use Boo.

Variable definition:

var1 as int
var2 as int = 2
var3 as single = 1.0 # single precision floating point number
var4 as double = 2.2342352 # double precision floating point number

Collections:

# Lists

myList1 as List
myList2 as List = List() # instantiates new List object
myList3 as List = List(1, 2, 3)
myList.Add(4)
Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox