The Labs \ Source Viewer \ SSCLI \ System.Runtime.InteropServices \ DefaultParameterValueAttribute

  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.Runtime.InteropServices
  16. {
  17.    
  18.     using System;
  19.    
  20.     //
  21.     // The DefaultParameterValueAttribute is used in C# to set
  22.     // the default value for parameters when calling methods
  23.     // from other languages. This is particularly useful for
  24.     // methods defined in COM interop interfaces.
  25.     //
  26.     [AttributeUsageAttribute(AttributeTargets.Parameter)]
  27.     public sealed class DefaultParameterValueAttribute : System.Attribute
  28.     {
  29.         public DefaultParameterValueAttribute(object value)
  30.         {
  31.             this.value = value;
  32.         }
  33.        
  34.         public object Value {
  35.             get { return this.value; }
  36.         }
  37.        
  38.         private object value;
  39.     }
  40. }

Developer Fusion