12345678910111213141516171819202122 |
- using System.Collections.Concurrent;
- namespace ConsoleApp3
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- var tests=new ConcurrentQueue<MyClass>();
- tests.TryDequeue(out var result);
- if (result != null)
- {
- Console.WriteLine("not null");
- }
- else { Console.WriteLine("result is null"); }
- }
- class MyClass
- {
- }
- }
- }
|