I read the XNA library code and inside the type VertexPositionColor, they suppress the message CA2105:ArrayFieldsShouldNotBeReadOnlywith the rationale "The cost of executing an array clone every time it is used is too high."
public struct VertexPositionColor
{
public static readonly VertexElement [ ] VertexElements;
}
But why copy it when used? This only happens for structures where the available property / field matters ValueType, right?
source
share