code-inefficiency

Why "Properties that return arrays are prone to code inefficiencies"?

Hi, I have a piece of code which deals with customers stored in database. There is an object Customer, and it has, among other, two properties of type byte[]: one property for password salt, the second one for password hash. Checking the code with FxCop, I see that it complains (CA1819, Performance Rules) that: "Properties that ret...

Properly implementing C#'s random number generator

I'm trying to generate two random numbers, one for a row and one for a column. In this exact instance, it is a multidimensional array with 4 rows and 4 columns. Thus, the number generator can use the values 0 to 3 for both row and column. I must also make sure that there are no duplicate points, so if [0,0] is chosen the first time, [0...