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
asxasxdf
Pramod
test
recursive solution for subset sum
isanagram
c# kum saati
show IP
Md5 hash
My First Hello world
1 to n