X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem%2FSystem.ComponentModel%2FDisplayNameAttribute.cs;h=38fac63034b08a07e474601f36610e9cb6d54e9f;hb=bd9e32f5d73882a39877c4435e6087d69d7ebb61;hp=62bbb087ef91559b712a0fc10d1d09171f5a1cd8;hpb=af90548a08ef5effc93b083b7eec44daa178b141;p=mono.git diff --git a/mcs/class/System/System.ComponentModel/DisplayNameAttribute.cs b/mcs/class/System/System.ComponentModel/DisplayNameAttribute.cs index 62bbb087ef9..38fac63034b 100644 --- a/mcs/class/System/System.ComponentModel/DisplayNameAttribute.cs +++ b/mcs/class/System/System.ComponentModel/DisplayNameAttribute.cs @@ -29,7 +29,7 @@ #if NET_2_0 namespace System.ComponentModel { - [AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Event)] + [AttributeUsageAttribute (AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event)] public class DisplayNameAttribute : Attribute { public static readonly DisplayNameAttribute Default = new DisplayNameAttribute (); @@ -43,12 +43,14 @@ namespace System.ComponentModel public DisplayNameAttribute (string displayName) { - this.attributeDisplayName = displayName != null ? displayName : String.Empty; + this.attributeDisplayName = displayName; } public override bool IsDefaultAttribute () { - return attributeDisplayName.Length == 0; + if (attributeDisplayName != null) + return attributeDisplayName.Length == 0; + return false; } public override int GetHashCode () @@ -74,7 +76,7 @@ namespace System.ComponentModel protected string DisplayNameValue { get { return attributeDisplayName; } - set { attributeDisplayName = value != null ? value : String.Empty; } + set { attributeDisplayName = value; } } } }