[VB.NET]急!求助
2008-12-26 23:29
351 查看
<script type="text/javascript"><!--
google_ad_client = "pub-8333940862668978";
/* 728x90, 创建于 08-11-30 */
google_ad_slot = "4485230109";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
急!求助
Public Shared Sub main(Optional ByVal noform() As String ={ "true ", "true "})
...................................
..................................
end sub
这样赋初值怎么不可以啊{ "true ", "true "},为什么提示要表达式
请那位大哥指救
__________________________________________________________________________
VB不会哈!
__________________________________________________________________________
数组做为参数时,应该先声明好吧?
__________________________________________________________________________
数组不是常量,不能作为默认值。
你应该在函数内对 noform.Length = 0 进行判断,然后用默认值进行处理。
__________________________________________________________________________
去掉Optional 关键字
Public Shared Sub main(ByVal noform() As String)
__________________________________________________________________________
你给行参赋值是不容许的。如果你想赋值,可以这么写:
Public Shared Sub main(Optional ByVal noform() As String)
noform() = { "true ", "true "}
...................................
..................................
end sub
__________________________________________________________________________
错了!不能那么赋值。不好意思。
Public Shared Sub main(Optional ByVal noform() As String)
noform(0) = "true "
noform(1) = "true "
...................................
..................................
end sub
__________________________________________________________________________
相关文章推荐
- [VB.NET][求助]有关ACCESS表中 主键/关键字 为 自动编号 时与实际数据库同步的问题????
- [VB.NET]【求助!!】将textbox中的输入值保存到txt文本文件中?
- [VB.NET]菜鸟求助:运行代码错误?
- [VB.NET]求助:关于取treeview父结点的问题.(在线...)
- 求助?求助?求助?VB.NET查询时间段出错!
- [VB.NET]求助!用VB.NE怎么实现TDataGrid的Web打印
- [VB.NET]求助:::ServerVersion = “sqlconn.ServerVersion”引发了“System.InvalidOperationException”类型的异常
- [VB.NET]100分求助!!!急!!!!!!!!!!!!!!!
- [VB.NET]getfilenames的问题求助!
- [VB.NET]求助,简单的问题
- [VB.NET]求助!!
- [VB.NET].net2005中Splitter问题求助
- [VB.NET]100分继续求助,急,在线等!!!!!!!!!!!!!!!
- [VB.NET]asp.net vb.net 菜鸟问题~~~求助
- [VB.NET]求助!如何判断数据库里某个字段是否为空!~~~
- [VB.NET]求助:将一句C#代码译为vb.net代码!
- [求助]vb.net中treeview的问题!
- [VB.NET]50分求助窗体显示问题(相当基础),谢谢!
- [VB.NET]菜鸟求助:ACCESS问题!备注型字段存不进数据!
- [VB.NET][新手求助]vb.net怎么生成exe文件