Converting ObjC Blocks to C# Lambas
- by Sam
I need some help converting an Objective-C block to C#.
Here is the source ObjC:
NSDate* addYear = [_calendar dateByAddingComponents:((^{
NSDateComponents* components = [NSDateComponents new];
components.month = 12;
return components;
})()) toDate:now options:0];
Now I tried the following in C#:
NSDate date =…