在subs中调用声明 [英] Calling declarations in subs

查看:160
本文介绍了在subs中调用声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在vb.net中是否可以调用或使用位于subs中的声明?

Its possible in vb.net to call or use declarations located in subs?

推荐答案

您可能会发现这段有趣的文档: [
You may find this piece of documentation interesting: "Scope in Visual Basic"[^].


Private Sub foo()
 Dim x as integer= 0;
End Sub ''foo



如果要从外部函数foo()访问x,则不可能.



If you mean accessing x from outside function foo(), its impossible.


这篇关于在subs中调用声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆