D
David Pendleton
Hello all.
I'm trying to find the best C# equivalent for the following VB.
If myCollection.Count > 0 Then
Dim myStrings() As New String((myCollection.Count - 1)) {}
myCollection.CopyTo(myStrings, 0)
End If
I have been unable to do something like the following because a constant is
required when initializing the array.
string[] myStrings = new string[(myCollection.Count - 1)] {}
Can someone point me in the right direction on this?
Thanks all.
I'm trying to find the best C# equivalent for the following VB.
If myCollection.Count > 0 Then
Dim myStrings() As New String((myCollection.Count - 1)) {}
myCollection.CopyTo(myStrings, 0)
End If
I have been unable to do something like the following because a constant is
required when initializing the array.
string[] myStrings = new string[(myCollection.Count - 1)] {}
Can someone point me in the right direction on this?
Thanks all.