Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
typedef NSDictionary* (^block)(NSString *collect_event);
我从 Obj-C 中的某个库中得到了这个语句,现在我需要用 C# 版本编写它。有人可以建议我吗?
根据我对目标 c 中块的理解,您的块将与
Func<string, Dictionary<object, object>> block;
您还没有详细说明该块的实际实现,所以我无法帮助您,但它会是这样的:
Func<string, Dictionary<object, object>> block = x => { // do something with x and return a dictionary }; var someValue = block("Foo");
使用 XSLT 标记