mcwave
April 20th, 2003, 04:42 PM
I have a hashtable and I may add repeated elements to it. It is pretty time-consuming to get hash code. So I don't want to write like following:
if(!ht.Contains(x))
ht.Add(x);
I want to write like this:
try{
ht.Add(x);
}
catch(ArgumentException e){
}
I am wondering that how fast exception handling is? Will it generate an interrupt?
Thanks
if(!ht.Contains(x))
ht.Add(x);
I want to write like this:
try{
ht.Add(x);
}
catch(ArgumentException e){
}
I am wondering that how fast exception handling is? Will it generate an interrupt?
Thanks