C#中?.的使用方式 demo如下 Point[] points = { new Point(1, 2), new Point(3, 4), new Point(5, 6) }; int? firstX = (int)points?.FirstOrDefault().X; Console.WriteLine(firstX);