PlatformList ??= new List<SnowPlatform>();
等效于
if (PlatformList==null) { PlatformList = new List<SnowPlatform>(); }
等效于
PlatformList = (PlatformList == null) ? new List<SnowPlatform>(): PlatformList;
也等效于
PlatformList = PlatformList ?? new List<SnowPlatform>();
终极简化写法:
PlatformList ??= new List<SnowPlatform>();