Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
ConcurrentStack<T>
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Threading; using System.Threading.Tasks; using System.Collections.Concurrent; namespace Rextester { public class Program { public static void Main(string[] args) { ConcurrentStack<int> stack = new ConcurrentStack<int>(); stack.Push(42); int result; if (stack.TryPop(out result)) Console.WriteLine("Popped: {0}", result); stack.PushRange(new int[] {1,2,3}); int[] values = new int[2]; stack.TryPopRange(values); foreach (int i in values) Console.WriteLine(i); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
summing a set
Fibonacci Series
Numerical string to fancy graphical output
Remove dublicates
from Base or Derived
first
Matrix Pattern
Using System.Reflection to find Property Name and Value of any Generic class
Ty
Plt-D v.0.9.2
Please log in to post a comment.