在这里记录一下,自己的复习所得,有大概一个月没有碰这些东西了,忘的很干净,今天要在C#中集成boo的环境中写点boo的代码,结果一写一个错,在这里记录一下,
如何在boo中使用静态变量
boo版
![ContractedBlock.gif](https://i-blog.csdnimg.cn/blog_migrate/0be121fa5b8988fbabbbc526af3b0fc0.gif)
![ExpandedBlockStart.gif](https://i-blog.csdnimg.cn/blog_migrate/34031c708bfe702fe82d01ff5c6593aa.gif)
<!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> -->namespace BooStaticDemo
import System
import System.Collections.Generic
#public class AppConfig
#public static FileName="aa"
print "Hello world!"
#print AppConfig.FileName
// Program goes here
public class Test:
public static name="aa"
print Test.name;
print "Press any key to continue
![](https://i-blog.csdnimg.cn/blog_migrate/b854634c0904529d4018c4c3336be836.gif)
Console.ReadKey()
如何在boo中做条件判断,刚开始这里写好几遍布都错了,python中是or不是C#中的||
![ContractedBlock.gif](https://i-blog.csdnimg.cn/blog_migrate/0be121fa5b8988fbabbbc526af3b0fc0.gif)
![ExpandedBlockStart.gif](https://i-blog.csdnimg.cn/blog_migrate/34031c708bfe702fe82d01ff5c6593aa.gif)
<!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> -->namespace test
import System
s=""
if s==null or s="":
Console.WriteLine("is null or empty")
else:
Console.WriteLine("not null or empty")
Console.ReadLine()
<!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> -->
namespace test
import System
import System.Collections
ht = Hashtable()
ht.Add( " 11 " , " ddd " )
print ht
print ht[ " 11 " ]
import System
import System.Collections
ht = Hashtable()
ht.Add( " 11 " , " ddd " )
print ht
print ht[ " 11 " ]