18. publicdoubleLength => Math.Sqrt(X * X + Y * Y); publicPersonthis[longid] => store[id];
Getter Only なプロパティやプロパティインデクサも 式形式で実装できる。 Get 修飾子は記述不要(自動的にGetter-only扱い)
38. staticvoidDemo() { // Array of 2 * Vector<int>.Length valuesint[] values = CreateValues(); // Multiply the first N values with the second// N values (N, being Vector<int>.Length). varx = newVector<int>(values, 0); vary = newVector<int>(values, Vector<int>.Length); varz = x * y; // Store the result in the array where x came fromz.CopyTo(values, 0); }