我已经通过很多线程和网站搜索了这个问题。到目前为止,我还没有发现这个代码有什么问题。未将对象引用设置为对象的实例
“坏”的代码是这样的:request.AddComment(v,c);
此外,我不知道堆栈跟踪是什么。
感谢您的提前帮助。
这里是我的代码:
string devkey = "1";
string username = "2";
string password = "3";
YouTubeRequestSettings a =
new YouTubeRequestSettings("test", devkey, username, password);
YouTubeRequest request = new YouTubeRequest(a);
Uri uri = new Uri("b");
Video v = request.Retrieve<Video>(uri);
Comment c = new Comment();
c.Content = "asdf";
request.AddComment(v, c);
请添加堆栈跟踪或至少是有问题的行 –
您可以发布堆栈跟踪吗? –
在这一行中最可疑的是'Video v = request.Retrieve