1): New a class, which can be used in the form1.
Write following code in form1.
private AxisLimits al; // This command will define a private variable al, this al
// variable has the characteristic of Class AxisLimits.
private form1()
{
initialization...
a1 = new AxisLimits();
}
private void AxisLimitSettings()
{
Applicationdata.ListXMax.Add(al.XMax);
}
private ...
{
}
-------------------------
al can be used in form1, and all method in form1.
===========================================
2): New a class, which can be used in a single method
private form1()
{
initialization...
}
private void AxisLimitSettings()
{
AxisLimits a1 = new AxisLimits();
Applicationdata.ListXMax.Add(al.XMax);
}
private ...
{
}
a1 can be used in AxisLimitSettings.
New Class
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
new thread 、 new stack和New Object的形象说明
e2 studio的使用
堆栈 Stack 网络协议栈 -
cocos creator 打开场景错误 [Scene] Missing class
本文给出cocos creator打开github上开源工程遭遇错误时遇到的一种可能问题的解决方案。
cocos creator 打开场景错误 missing class -
idea不能new java class
找到idea中的file->project struture->modules->点击右侧的tests->点击应用apply->即可
idea 创建项目 class 类 idea不能new java class