Program.cs 473 B

12345678910111213141516171819202122
  1. using System.Collections.Concurrent;
  2. namespace ConsoleApp3
  3. {
  4. internal class Program
  5. {
  6. static void Main(string[] args)
  7. {
  8. var tests=new ConcurrentQueue<MyClass>();
  9. tests.TryDequeue(out var result);
  10. if (result != null)
  11. {
  12. Console.WriteLine("not null");
  13. }
  14. else { Console.WriteLine("result is null"); }
  15. }
  16. class MyClass
  17. {
  18. }
  19. }
  20. }