使用arraylist的多个预订 [英] Multiple bookings using arraylist

查看:92
本文介绍了使用arraylist的多个预订的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人有使用arraylist进行多个预订项目的经验吗?
我可以知道从哪里获得参考资料?我是编码的初学者,并且想通过更多代码来提高自己的编程水平.

谢谢.

does anyone have experience of doing multiple booking project using arraylist?
can I know where to get references from? I am a beginner in codings and would like to expose myself in more codes to improve my programming.

Thanks.

推荐答案

错误的方法.问用B做A"适得其反.如果您需要建议,请告诉我们您想要实现什么,不要告诉我们如何实现.

获取此数组列表.在引入泛型后的.NET Framework 2.0版中,类System.Collections.ArrayList就被淘汰了.您需要使用System.Collections.Generic.Array<T>以及其他常规集合类型.非泛型类型(不包括特殊类型)没有被过时的属性标记,只是因为将它们保留在旧代码中没有什么错误,但是在新代码中使用它们毫无意义.

请参阅:
http://msdn.microsoft.com/en-us/library/system.collections. arraylist.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/system.collections.generic [^ ].

而且多次预订"主题也是特定于应用程序的.这不是您可以从某人的经验中借鉴的东西,而是您需要设计和实现的东西.如果您在使用过程中遇到特殊问题,我们将很乐意为您提供帮助.

—SA
Wrong approach. Asking "make A using B" is counter-productive. If you want an advice, tell us what do you want to achieve, don''t tell us how.

Take this array list. The class System.Collections.ArrayList was rendered obsolete as soon as the time of the version 2.0 of .NET Framework, when generics were introduced. You need to use System.Collections.Generic.Array<T>, as well as other generic collection types. Non-generic types (not counting specialized types) were not marked by the obsolete attribute only because there is nothing wrong in keeping them in legacy code, but using them in new code makes no sense at all.

Please see:
http://msdn.microsoft.com/en-us/library/system.collections.arraylist.aspx[^],
http://msdn.microsoft.com/en-us/library/system.collections.generic[^].

And the topic of "multiple booking" is too application-specific. This is not something what you can borrow from someone''s experience, this is something you need to design and implement. If you face particular problems on the way to it, we will gladly help you.

—SA


这篇关于使用arraylist的多个预订的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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