我有问题从Windows Phone 7上的队列中检索Azure邮件.
添加消息我正在使用这样的代码:
var queueClient = CloudStorageContext.
Current.
Resolver.
CreateCloudQueueClient() as CloudQueueClient;
var queue = queueClient.GetQueueReference("queuein");
queue.Create(
r => queue.AddMessage(
new CloudQueueMessage { AsBytes = Encoding.UTF8.GetBytes(msg) },
c =>
{
// Some logic here.
}));
Run Code Online (Sandbox Code Playgroud)
为了获得消息,看起来我必须遵循类似的原则并使用队列实例.但是GetMessage()方法有VOID返回类型:

你能帮我理解Azure队列的移动版本到底发生了什么,因为在Windows控制台应用程序中这些方法有返回类型.
有人可以解释一下原始double类型NaN在跟随计算后是否可能等于.你能告诉我一些double可能最终结果的案例Nan吗?谢谢!
double averagePrecisionExisting = 0;
for (int i = 0; i < x; i++)
averagePrecisionExisting += logicWhichReturnsPrimitiveDouble();
double meanAveragePrecisionExisting = averagePrecisionExisting / x.size();
System.out.println("Mean average precision of existing algorithm = " + meanAveragePrecisionExisting);
Run Code Online (Sandbox Code Playgroud)
输出: Mean average precision of existing algorithm = NaN
有什么区别:
int myArray[5];
Run Code Online (Sandbox Code Playgroud)
和
int* myArray = new int[5];
Run Code Online (Sandbox Code Playgroud) 我可以有两个字符串行的情况.
string mystring = "/aaa/bbb/ccc/ddd/eee"
Run Code Online (Sandbox Code Playgroud)
和
string mystring2 = "aaa/bbb/ccc/ddd/eeee/";
Run Code Online (Sandbox Code Playgroud)
当然我可以使用'/'拆分并做一些检查,但我正在寻找一些优雅的解决方案.
如果我做mystring.Split('/')它可以在数组的第2或第3位置,我怎么知道它在哪里?
我如何获得'ccc'?
谢谢!