Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
IEnumerable visibility of bag
//Title of this code //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.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Threading; using System.Collections.Concurrent; namespace Rextester { public class Program { public static void Main(string[] args) { //Your code goes here ConcurrentBag<int> bag = new ConcurrentBag<int>(); Task.Run(()=> { bag.Add(42); Thread.Sleep(1000); bag.Add(21); }); Task.Run(()=> { foreach(int i in bag) Console.WriteLine(i); }).Wait(); } } }
run
|
edit
|
history
|
help
0
test
sdgsdhsdhs
koko
save bitmap from stream problem
newstring vs regex
MidtermsGame_Rampage_12Geronimo
give coins
Stack as a queue
jkloikujyt5r4e3wsxdf
SAF Mid Terms