Prechádzať zdrojové kódy

Constraint.cs : Small perfomance fix (avoid unnesessary string concatenation).

svn path=/trunk/mcs/; revision=25957
Boris Kirzner 22 rokov pred
rodič
commit
9716e8d4e3

+ 5 - 0
mcs/class/System.Data/System.Data/ChangeLog

@@ -1,6 +1,11 @@
+2004-04-25  Boris Kirzner <[email protected]>
+
+	* Constraint.cs : Small perfomance fix (avoid unnesessary string concatenation).
+
 2004-04-23 Umadevi S ([email protected])
 	*  DataRow.cs: Checked BeginEdit,EndEdit,CancelEdit and Delete methods
 	   - Added error handling to the above methods
+	   
 2004-04-22  Atsushi Enomoto  <[email protected]>
 
 	* DataSet.cs : Data should be read when mode is IgnoreSchema (well,

+ 2 - 2
mcs/class/System.Data/System.Data/Constraint.cs

@@ -58,7 +58,7 @@ namespace System.Data {
 		[DataSysDescription ("Indicates the name of this constraint.")]
 		[DefaultValue ("")]
 		public virtual string ConstraintName {
-			get{ return "" + _constraintName; } 
+			get{ return _constraintName == null ? "" : _constraintName; } 
 			set{
 				//This should only throw an exception when it
 				//is a member of a ConstraintCollection which
@@ -189,7 +189,7 @@ namespace System.Data {
 		/// </summary>
 		public override string ToString () 
 		{
-			return "" + _constraintName;
+			return _constraintName == null ? "" : _constraintName;
 		}
 
 	}