3 namespace System.ComponentModel
\r
6 /// Specifies the default value for a property.
\r
9 [MonoTODO("Needs testing. DefaultValueAttribute(System.Type type, string value) is not implemented. Value has no description.")]
\r
10 [AttributeUsage(AttributeTargets.Parameter)]
\r
11 public sealed class DefaultValueAttribute : Attribute
\r
14 private object defaultValue;
\r
17 /// FIXME: Summary description for Value.
\r
23 return defaultValue;
\r
28 /// Initializes a new instance of the System.ComponentModel.DefaultValueAttribute class.
\r
30 /// <param name="value">An System.Object that represents the default value.</param>
\r
31 public DefaultValueAttribute(object value)
\r
33 defaultValue = value;
\r
37 /// Initializes a new instance of the System.ComponentModel.DefaultValueAttribute class using a System.Boolean value.
\r
39 /// <param name="value">An System.Boolean that represents the default value.</param>
\r
40 public DefaultValueAttribute(bool value)
\r
42 defaultValue = value;
\r
47 /// Initializes a new instance of the System.ComponentModel.DefaultValueAttribute class using an 8-bit unsigned integer.
\r
49 /// <param name="value">An 8-bit unsigned integer that is the default value.</param>
\r
50 public DefaultValueAttribute(byte value)
\r
52 defaultValue = value;
\r
56 /// Initializes a new instance of the System.ComponentModel.DefaultValueAttribute class using a Unicode character.
\r
58 /// <param name="value">A Unicode character that is the default value.</param>
\r
59 public DefaultValueAttribute(char value)
\r
61 defaultValue = value;
\r
65 /// Initializes a new instance of the System.ComponentModel.DefaultValueAttribute class using a double-precision floating point number.
\r
67 /// <param name="value">A double-precision floating point number that is the default value.</param>
\r
68 public DefaultValueAttribute(double value)
\r
70 defaultValue = value;
\r
74 /// Initializes a new instance of the System.ComponentModel.DefaultValueAttribute class using a 32-bit signed integer.
\r
76 /// <param name="value">A 32-bit signed integer that is the default value.</param>
\r
77 public DefaultValueAttribute(int value)
\r
79 defaultValue = value;
\r
83 /// Initializes a new instance of the System.ComponentModel.DefaultValueAttribute class using a 64-bit signed integer.
\r
85 /// <param name="value">A 64-bit signed integer that is the default value.</param>
\r
86 public DefaultValueAttribute(long value)
\r
88 defaultValue = value;
\r
92 /// Initializes a new instance of the System.ComponentModel.DefaultValueAttribute class using a 16-bit signed integer.
\r
94 /// <param name="value">A 16-bit signed integer that is the default value.</param>
\r
95 public DefaultValueAttribute(short value)
\r
97 defaultValue = value;
\r
101 /// Initializes a new instance of the System.ComponentModel.DefaultValueAttribute class using a single-precision floating point number.
\r
103 /// <param name="value">A single-precision floating point number that is the default value.</param>
\r
104 public DefaultValueAttribute(System.Single value)
\r
106 defaultValue = value;
\r
110 /// Initializes a new instance of the System.ComponentModel.DefaultValueAttribute class using a System.String.
\r
112 /// <param name="value">A System.String that is the default value.</param>
\r
113 public DefaultValueAttribute(string value)
\r
115 defaultValue = value;
\r
120 /// Initializes a new instance of the System.ComponentModel.DefaultValueAttribute class, converting the specified value to the specified type, and using an invariant culture as the translation context.
\r
122 /// <param name="type">A System.Type that represents the type to convert the value to.</param>
\r
123 /// <param name="value">A System.String that can be converted to the type using the System.ComponentModel.TypeConverter for the type and the U.S. English culture.</param>
\r
124 public DefaultValueAttribute(System.Type type, string value)
\r
127 throw new NotImplementedException();
\r