projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2002-09-15 Duncan Mak <duncan@ximian.com>
[mono.git]
/
mcs
/
class
/
System.XML
/
System.Xml
/
NameTable.cs
diff --git
a/mcs/class/System.XML/System.Xml/NameTable.cs
b/mcs/class/System.XML/System.Xml/NameTable.cs
index 42586b1f3de4f8aa51023d970956bd8540fb27db..c85332180409133b9560fca8b5a35a23017f8877 100755
(executable)
--- a/
mcs/class/System.XML/System.Xml/NameTable.cs
+++ b/
mcs/class/System.XML/System.Xml/NameTable.cs
@@
-26,10
+26,12
@@
namespace System.Xml
// Method
public override string Add (string key)
{
// Method
public override string Add (string key)
{
- if (table.Contains
Key
(key))
+ if (table.Contains (key))
return (string) table [key];
return (string) table [key];
- else
- return Get (key);
+ else {
+ table.Add (key, key);
+ return key;
+ }
}
public override string Add (char[] key, int start, int len)
}
public override string Add (char[] key, int start, int len)
@@
-48,7
+50,7
@@
namespace System.Xml
public override string Get (string key)
{
public override string Get (string key)
{
- if (!
(table.ContainsKey
(key)))
+ if (!
(table.Contains
(key)))
return null;
else
return (string) table [key];
return null;
else
return (string) table [key];
@@
-64,9
+66,9
@@
namespace System.Xml
if (length == 0)
return String.Empty;
if (length == 0)
return String.Empty;
- string
item
= new string (array, offset, length);
+ string
key
= new string (array, offset, length);
- return Get (
item
);
+ return Get (
key
);
}
}
}
}
}
}