问题又来了,请大家看看:
Imports System...................1
Imports System.Threading.........2
Imports System.Threading.Timer...3
在1中system为名字空间
在2中system,Threading为名字空间
在3中System.Threading为名字空间,timer为类1,2,3不是属于的关系吗?(也就是:为什么有了1,还要加上2和3呢?难道1中不包括2等等)谢谢了
Imports System...................1
Imports System.Threading.........2
Imports System.Threading.Timer...3
在1中system为名字空间
在2中system,Threading为名字空间
在3中System.Threading为名字空间,timer为类1,2,3不是属于的关系吗?(也就是:为什么有了1,还要加上2和3呢?难道1中不包括2等等)谢谢了
这种我完全能理解,但是上面那种就不理解了。。等你们来。
如果不加Imports System.Threading.Timer,这一句,那么声明Timer的时候应该是:
System.Threading.Timer t=New System.Threading.Timer()
加上以后就可以这样:
Timer t=New Timer()
是不是方便了许多~!
Import namespace="System.Data"
Import namespace="System.Data.OleDb"如果只引用:
Import namespace="System.Data"
那么用OleDbCommand时要这么写:
OleDb.OleDbCommand dc = new OleDb.OleDbCommand()引用了:
Import namespace="System.Data"
Import namespace="System.Data.OleDb"
就可以这么写了:
OleDbCommand dc = new OleDbCommand()