以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  全局字典问题  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=75338)

--  作者:ycli368
--  发布时间:2015/10/5 22:27:00
--  全局字典问题
定义了一个结构
Public structure TaskControlStruct
  Public Current As Integer
  Public Total As Integer

  Public FuncName As String  
  
  Public Stoped As String
  Public suspend As String
  Public Obj() As String
End structure

Public TaskDic As Dictionary(of String, TaskControlStruct)


Dim tasktmp As TaskControlStruct
Dim Objtmp(8) As String

tasktmp.FuncName = "sub1"
Objtmp(0) = "plan1" & cstr(plan1flag)
tasktmp.obj = Objtmp
messagebox.show(1)
TaskDic.add("plan1" & cstr(plan1flag),tasktmp)  添加提示未把实例引用到对象

[此贴子已经被作者于2015/10/5 22:32:24编辑过]

--  作者:jspta
--  发布时间:2015/10/6 0:07:00
--  
字典要用new声明一个实例
--  作者:ycli368
--  发布时间:2015/10/6 8:32:00
--  
谢了,昏头了