It's pretty much difficult to convert this into C# code, but let me try and see how it goes.
plsaiuser wrote: |
|
I'm not too sure what you're doing here, but maybe it's something like this.
Object vaResultSet = new Object();
plsaiuser wrote: |
| If Not IsArray(vaResultSet) Then
|
|
This can be done using something like this.
Type at = typeof(vaResultSet);
if (!at.IsArray) {
plsaiuser wrote: |
|
This is somewhat interesting. ReDim resizes the object to an array of 0. It's pretty difficult to do this unless vaResultSet has been declared an array first. I would suggest that the 1st line when declaring vaResultSet be an array instead. Or assign it to another variable and return the array instead. So I would do something like this.
Before the if-else statement, I'll declare an array variable first.
Object[] myArray;
Then for the ReDim itself,
myArray = new Object[1];
myArray[0] = vaResultSet;
plsaiuser wrote: |
Else
ReDim Preserve vaResultSet(UBound(vaResultSet) + 1)
|
|
This is also pretty interesting to do. In C# you won't be able to resize the object, so you'll have to create another new object to do so.
myObject = new Object(varResultSet.Length) + 1);
Array.Copy(myObject, varResultSet, varResultSet.Length);
plsaiuser wrote: |
|
that should do the trick. You can replace Object with any type u require. I'm just assuming here.