在运行时设置数组大小 - Windows Phone运行时 [英] Set array size at runtime - Windows Phone runtime
本文介绍了在运行时设置数组大小 - Windows Phone运行时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个Windows Phone Runtime组件,我需要在一个数组中存储字符串列表。
不需要预先设置数组大小。大小应该在运行时设置。
我正在使用 ""Platform :: Array< String ^> strArray(512);" ;.这里的大小设置为512.
我想知道是否有办法在运行时设置大小。
解决方案
使用Array.Resize函数
http://msdn.microsoft.com/en-us/library/bb348051(v = vs.110)的.aspx
I have a Windows Phone Runtime component where in I need to store the list of strings in an array.
The array size need not be pre-set. The size should be set at run time.
I am using "Platform::Array<String^> strArray(512);". Here the size is set to 512.
I would like to know if there is a way to set the size at runtime.
解决方案
Use Array.Resize function
http://msdn.microsoft.com/en-us/library/bb348051(v=vs.110).aspx
这篇关于在运行时设置数组大小 - Windows Phone运行时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文