我是Windows手机编程的新手,所以我有一个问题。如何将类型String
转换为其指针类型(String^
)?这是来自windows phone 8.1程序样本的片段
Uri^ uri;
String^ ready;
TryGetUri(L"http://abotstars.16mb.com/images", &uri);
filter->CacheControl->ReadBehavior = HttpCacheReadBehavior::Default;
filter->CacheControl->WriteBehavior = HttpCacheWriteBehavior::Default;
create_task(httpClient->GetAsync(uri), cancellationTokenSource.get_token()).then([=](HttpResponseMessage^ response)
{
}, task_continuation_context::use_current()).then([=](task<HttpResponseMessage^> previousTask)
{
// Check if any previous task threw an exception.
HttpResponseMessage^ response = previousTask.get();
ready = response->Source.ToString();
});
// Create a notification for the Square310x310 tile using one of the available templates for the size.
auto tileContent = TileContentFactory::CreateTileSquare310x310Text09();
tileContent->TextHeadingWrap->Text = "Hello World! My very own tile notification";
我想把来自服务器的响应放到Tile。但IntelliSense(VS2013)表示,左边的值无法改变。它说了一些关于lambda值的东西。我真的不知道它想要什么,但我尝试了不同的方法来获得这个值并且总是得到不同的错误。我做错了什么?
对不起SDK的俄语:D。所以这是一个错误,表明它无法转换String^
答案 0 :(得分:0)
如果有人有类似问题 - 问题在这里:
create_task(httpClient->GetAsync(uri), cancellationTokenSource.get_token()).then([=](HttpResponseMessage^ response)
{
}
有空括号。