我怎样才能使用类的数组 [英] How can I use the array of class
问题描述
在我的windows形式组合框中。我有两种模式叫做CELL和MODE。单元格中有12个子模式,MODE有两个。我必须在课堂上定义它。我已经习惯了,但我面临一个问题。我的问题是我有单位称为振幅;频率;持续时间;速度;距离;在每种模式下。例如,如果我在组合框中选择mode1,则必须指定幅度;频率;持续时间和模式2其他。从文本框中获得的最终值,我必须转换为xml文件。如何使用类中的这个值来调用xml文件。?
i已经实现了没有类,但我的代码很长,如果我需要添加一个额外的整数我必须编码所有内容。请帮忙,因为我是新人..
我尝试过:
i已经使用了没有类在类中定义整数。
In my windows form combobox. I have two modes called "CELL" and "MODE". the cell has 12 submodes in it and "MODE" has two. i have to define it in class. I have used it but I dint face a problem. My problem is i have units called Amplitude;frequency;Duration;Speed;Distance; under each mode. For example if i select mode1 in combo box it has to specify Amplitude;frequency;Duration and mode2 the others. This final attained value from the textbox i have to convert into xml file. how can i call the xml file using this values from class.?
i have achieved without class but my code is lengthy and in case if i need to add an extra integer i have to code in everything. Please help since i am new..
What I have tried:
i have used without class defining the integers everytime in class.
推荐答案
阅读MSDN文档总是很好的开始:
从XML生成数据类型类 [ ^ ]
演练:创建自己的收藏类 [ ^ ]
Reading MSDN documentation is always good point for start:
Generating Data Type Classes from XML[^]
Walkthrough: Creating Your Own Collection Class[^]
这篇关于我怎样才能使用类的数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!