C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,839 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
Here's the working code:
Dim MyString(MyValues.Count - 1) As String
For MyLoop As Integer = 0 To MyValues.Count - 1
MyString(MyLoop) = MyValues.Item(MyLoop).Text
Next
Return MyString
I'm courious to know if there's a way to simplify this code and return the whole members of MyValues.Text as string array at once? (like using Linq)
Thanks for help :)
Hi @Peter Volz ,
Try the following code using Linq to get the string array.
Dim MyString() As String = MyValues.Select(Function(item) item.Text).ToArray()
Return MyString
Best Regards.
Jiachen Li
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.