このテキストの下にあるコードを修正するにはどうすればよいですか?
//puncts = puncts ?? new List<Vector2>() { new Vector2(position.X, position.Y) };
if (Vector2.Distance(position, puncts[indexpunkt] = puncts[indexpunkt] ?? new Vector2(position.X, position.Y) ) < 1)
indexpunkt++;
エラー:
Error 1 Operator '??' cannot be applied to operands of type 'Microsoft.Xna.Framework.Vector2' and 'Microsoft.Xna.Framework.Vector2'
null の場合は新しいパンクトを作成し、そのリストに最初の要素を追加します。演算子を使用できますか?また、ステートメントで演算子を使用するには??
どうすればよいですか? if