这是我的代码
Private Async Sub ShowMemberToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ShowMemberToolStripMenuItem.Click
For Each C As ListViewItem In listfile.SelectedItems
Dim sharefolder = Await A.Files.GetMetadataAsync(direktori.Text & "/" & C.Text)
Dim sharedfolderid = sharefolder.AsFolder.SharedFolderId.ToString
If sharedfolderid = String.Empty Then
MessageBox.Show("Not Shared Folder")
Else
Dim member = A.Sharing.ListFolderMembersAsync(sharedfolderid, limit:=100).Result.Users
Dim list = String.Join(",", member.ToArray())
MessageBox.Show(list)
End If
Next
End Sub
答案 0 :(得分:0)
从Dropbox API documention我发现这个JSON代码段显示User
是什么:
"membership": [
{
"user": {
"display_name": "Jane P. User",
"email": "jane@example.com",
"email_verified": true,
"member_id": "dbmid:abcd1234"
"same_team": true,
"uid": 87654321
},
"access_type": "owner",
"active": true
},
...
]
所以,当你试图做Dim list = String.Join(",", member.ToArray())
时,它不知道应该输出什么,除非你覆盖该类的ToString
(在这种情况下不值得这样做)。
你要做的是,在Users
上运行一个选择,如下所示:
Dim usersOutput = member.Select(Function(m) m.DisplayName)
Dim list = String.Join(",", usersOutput)