This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class C { | |
| public void M() { | |
| int x = 0; | |
| { | |
| int y = 0; | |
| // Captures two struct closures | |
| int L() => x + y; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class C | |
| { | |
| [DllImport...] | |
| private static extern IntPtr GetAHandle(); | |
| private static Task WrapHandle() | |
| { | |
| var handle = GetAHandle(); | |
| var tcs = new TaskCompletionSource(); | |
| Task.Run(() => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 20000100000 | |
| 20000100000 | |
| 20000100000 | |
| 20000100000 | |
| 20000100000 | |
| 20000100000 | |
| ; Assembly listing for method Name.Program:IfeHelper(struct):long:this | |
| ; Emitting BLENDED_CODE for X64 CPU with AVX | |
| ; optimized code | |
| ; rbp based frame |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static extern void MyPInvoke(IntPtr ptrToCstr) | |
| static void Main() | |
| { | |
| IntPtr ptr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(IntPtr))); | |
| try | |
| { | |
| MyPInvoke(ptr); | |
| IntPtr cstrPtr = Marshal.PtrToStructure(ptr, typeof(IntPtr)) |
NewerOlder