mirror of
https://github.com/qmlnet/qmlnet.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #218] How to pass a list to C#? #140
Labels
No labels
bug
enhancement
help wanted
help wanted
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/qmlnet#140
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vadi2 on GitHub (Aug 16, 2020).
Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/218
I need to pass a list of
urls from QML to a C# method.So far I've tried
List<string>as the parameter signature on the C# side and converted all of theurls tostrings in QML, which does seem to create a parameter on the C#, but that list is empty as far as it's concerned.@pauldotknopf commented on GitHub (Aug 16, 2020):
Pass the array to C# as a
INetJsValue, then useAsList<T>()to convert that javascript value to a list.There is plans to eventually make this more seamless.
845913eb3b/src/net/Qml.Net/Extensions/INetJsValueExtensions.cs (L9)