Browse Source

2002-06-12 Duncan Mak <[email protected]>

	* XmlCharacterData.cs (Value): Throw an ArgumentException if the
	node is read-only.

svn path=/trunk/mcs/; revision=5241
Duncan Mak 23 years ago
parent
commit
f107fa2fca

+ 5 - 0
mcs/class/System.XML/System.Xml/ChangeLog

@@ -1,3 +1,8 @@
+2002-06-12  Duncan Mak  <[email protected]>
+
+	* XmlCharacterData.cs (Value): Throw an ArgumentException if the
+	node is read-only.
+
 2002-06-10  Ajay kumar Dwivedi <[email protected]>
 	* XmlConstruct.cs : New Internal class with Helper methods for
 	Checking XmlConstructs

+ 5 - 1
mcs/class/System.XML/System.Xml/XmlCharacterData.cs

@@ -47,7 +47,11 @@ namespace System.Xml
 		}
 
 		public override string Value {
-			get { return data; }
+			get {
+				if (IsReadOnly)
+					throw new ArgumentException ("Node is read-only.");
+				
+				return data; }
 
 			set { data = value; }
 		}