本文整理汇总了C#中Db4objects.Db4o.Foundation.Hashtable4.Remove方法的典型用法代码示例。如果您正苦于以下问题:C# Hashtable4.Remove方法的具体用法?C# Hashtable4.Remove怎么用?C# Hashtable4.Remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Db4objects.Db4o.Foundation.Hashtable4
的用法示例。
在下文中一共展示了Hashtable4.Remove方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestByteArrayKeys
public virtual void TestByteArrayKeys()
{
byte[] key1 = new byte[] { 1, 2, 3 };
byte[] key2 = new byte[] { 3, 2, 1 };
byte[] key3 = new byte[] { 3, 2, 1 };
// same values as key2
Hashtable4 table = new Hashtable4(2);
table.Put(key1, "foo");
table.Put(key2, "bar");
Assert.AreEqual("foo", table.Get(key1));
Assert.AreEqual("bar", table.Get(key2));
Assert.AreEqual(2, CountKeys(table));
Assert.AreEqual(2, table.Size());
table.Put(key3, "baz");
Assert.AreEqual("foo", table.Get(key1));
Assert.AreEqual("baz", table.Get(key2));
Assert.AreEqual(2, CountKeys(table));
Assert.AreEqual(2, table.Size());
Assert.AreEqual("baz", table.Remove(key2));
Assert.AreEqual(1, CountKeys(table));
Assert.AreEqual(1, table.Size());
Assert.AreEqual("foo", table.Remove(key1));
Assert.AreEqual(0, CountKeys(table));
Assert.AreEqual(0, table.Size());
}
示例2: TestContainsKey
public virtual void TestContainsKey()
{
var table = new Hashtable4();
Assert.IsFalse(table.ContainsKey(null));
Assert.IsFalse(table.ContainsKey("foo"));
table.Put("foo", null);
Assert.IsTrue(table.ContainsKey("foo"));
table.Put("bar", "baz");
Assert.IsTrue(table.ContainsKey("bar"));
Assert.IsFalse(table.ContainsKey("baz"));
Assert.IsTrue(table.ContainsKey("foo"));
table.Remove("foo");
Assert.IsTrue(table.ContainsKey("bar"));
Assert.IsFalse(table.ContainsKey("foo"));
}
示例3: CreateConfigAndConstructor
internal void CreateConfigAndConstructor(Hashtable4 a_byteHashTable, IReflectClass
claxx)
{
SetName(ResolveName(claxx));
SetConfig(ConfigImpl().ConfigClass(GetName()));
if (claxx == null)
{
ResolveClassReflector(GetName());
}
else
{
ClassReflector(claxx);
}
// createConstructor(true);
if (i_nameBytes != null)
{
a_byteHashTable.Remove(i_nameBytes);
i_nameBytes = null;
}
}