using System.Threading.Tasks;
using System.Collections.Generic;
public static void Main()
var myObj = new MyObj{Value = 1};
var task1 = Print(myObj, 1000);
public static async Task Print(MyObj myObj, int waitDuration)
await Task.Run(() => Thread.Sleep(waitDuration));
Console.WriteLine(myObj.Value == null ? "null" : myObj.Value.ToString());
public int? Value { get; set; }