The Labs \ Source Viewer \ SSCLI \ System.Reflection \ ParameterModifier

  1. // ==++==
  2. //
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. //
  14. // ==--==
  15. namespace System.Reflection
  16. {
  17.     using System;
  18.    
  19.     [Serializable()]
  20.     [System.Runtime.InteropServices.ComVisible(true)]
  21.     public struct ParameterModifier
  22.     {
  23.         #region Private Data Members
  24.         private bool[] _byRef;
  25.         #endregion
  26.        
  27.         #region Constructor
  28.         public ParameterModifier(int parameterCount)
  29.         {
  30.             if (parameterCount <= 0)
  31.                 throw new ArgumentException(Environment.GetResourceString("Arg_ParmArraySize"));
  32.            
  33.             _byRef = new bool[parameterCount];
  34.         }
  35.         #endregion
  36.        
  37.         #region Internal Members
  38.         internal bool[] IsByRefArray {
  39.             get { return _byRef; }
  40.         }
  41.         #endregion
  42.        
  43.         #region Public Members
  44.         public bool this[int index]
  45.         {
  46.             get { return _byRef[index]; }
  47.             set { _byRef[index] = value; }
  48.         }
  49.         #endregion
  50.     }
  51. }

Developer Fusion