skydrive System.Dynamic.DynamicObject

前端 未结 2 972
予麋鹿
予麋鹿 2021-01-21 09:20

I\'m trying to get a listing of all the folders for a signed in user on SkyDrive.

LiveOperationResult operationResult = await client.GetAsync(\"me/skydrive/file         


        
2条回答
  •  礼貌的吻别
    2021-01-21 09:51

    I think that you receive this because you have declared result using the following code

    dynamic result = operationResult.Result;
    

    this will declare result as a new System.Dynamic.DynamicObject so that, when we say

    Dictionary folderData = (Dictionary)result;
    

    You are trying to convert result of type System.Dynamic.DynamicObject to System.Collections.Generic.Dictionary which is not possible and that's why you receive the error.

    Thanks,
    I hope you find this helpful :)

提交回复
热议问题