예제 #1
0
        static void VariableViewAccess(ArrayView <int> view)
        {
            // Creates a variable view that points to the last accessible element
            // of the provided view
            var variableView = view.GetVariableView(view.Length - 1);

            variableView.Store(13);

            // Note that view.Load(idx) is an alias for view[idx]
            Debug.Assert(variableView.Load() == view.Load(view.Length - 1));
        }