为什么我在值类型为属性但不在数组上的结构列表中出现CS1612错误?
例如:
List<VertexPositionColorTexture> y = new List<VertexPositionColorTexture>();
y[0].Position = Vector3.Left; // CS1612
VertexPositionColorTexture[] x = new VertexPositionColorTexture[4];
x[0].Position = Vector3.Down; // fine
两者都试图修改一个值类型,为什么数组有效呢?