Skip to content

Commit 0a6e1ec

Browse files
Update TopFuture.md
1 parent 06904b9 commit 0a6e1ec

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Documentation/Stack/TopFuture.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,21 @@ Exception
1919
```
2020

2121
If Future element not available
22+
23+
```C#
24+
25+
unsafe
26+
{
27+
using (var memory = new StackMemoryCollections.Struct.StackMemory(sizeof(int) * 10))
28+
{
29+
using var stack = new StackMemoryCollections.Struct.StackOfInt32(10, &memory);
30+
for (int i = 0; i < 10; i++)
31+
{
32+
int* futureTop = stack.TopFuture();
33+
*futureTop = i;
34+
stack.PushFuture();
35+
}
36+
}
37+
}
38+
39+
```

0 commit comments

Comments
 (0)