C# 中的 Redim 保留? [英] Redim Preserve in C#?
本文介绍了C# 中的 Redim 保留?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我今天震惊地发现 C# 不支持动态大小的数组.那么 VB.NET 开发人员如何习惯使用 ReDim Preserve 在 C# 中处理这个问题?
I was shocked to find out today that C# does not support dynamic sized arrays. How then does a VB.NET developer used to using ReDim Preserve deal with this in C#?
在函数的开头我不确定数组的上限.这取决于从数据库返回的行.
At the beginning of the function I am not sure of the upper bound of the array. This depends on the rows returned from the database.
推荐答案
改用 ArrayLists 或泛型
Use ArrayLists or Generics instead
这篇关于C# 中的 Redim 保留?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文