Click here to Skip to main content
15,891,951 members
Home / Discussions / C#
   

C#

 
GeneralRe: Crystal reports? Pin
Marix6-Aug-03 20:07
Marix6-Aug-03 20:07 
GeneralVB.Net- C# integration Pin
Madhuri Mittal5-Aug-03 23:25
Madhuri Mittal5-Aug-03 23:25 
GeneralRe: VB.Net- C# integration Pin
SimonS6-Aug-03 1:17
SimonS6-Aug-03 1:17 
GeneralRe: VB.Net- C# integration Pin
Ista6-Aug-03 17:44
Ista6-Aug-03 17:44 
GeneralVB.Net- C# integration Pin
Madhuri Mittal5-Aug-03 22:44
Madhuri Mittal5-Aug-03 22:44 
GeneralRe: VB.Net- C# integration Pin
Ista6-Aug-03 17:46
Ista6-Aug-03 17:46 
GeneralHashtable problem Pin
yboc5-Aug-03 22:36
yboc5-Aug-03 22:36 
GeneralRe: Hashtable problem Pin
Alexander Kojevnikov5-Aug-03 23:52
Alexander Kojevnikov5-Aug-03 23:52 
MSDN - foreach:
The foreach statement is used to iterate through the collection to get the desired information, but should not be used to change the contents of the collection to avoid unpredictable side effects.

MSDN - Hashtable.Keys Property:
The returned ICollection is not a static copy; instead, the ICollection refers back to the keys in the original Hashtable. Therefore, changes to the Hashtable continue to be reflected in the ICollection.

An alternative approach could looke like this:
Hashtable ht = new Hashtable();
ht.Add("one", 1);
ht.Add("two", 2);
ht.Add("three", 3);
ht.Add("four", 4);

ICollection keys = ht.Keys;
object[] copiedKeys = new object[keys.Count];
keys.CopyTo(copiedKeys, 0);
foreach(object key in copiedKeys)
{
    ht[key] = "";
}


Alexandre Kojevnikov
MCAD charter member
Leuven, Belgium

GeneralRe: Hashtable problem Pin
yboc6-Aug-03 15:40
yboc6-Aug-03 15:40 
GeneralUsing a C++ library in C# Pin
eggie55-Aug-03 22:32
eggie55-Aug-03 22:32 
GeneralRe: Using a C++ library in C# Pin
Alexander Kojevnikov5-Aug-03 23:17
Alexander Kojevnikov5-Aug-03 23:17 
GeneralRe: Using a C++ library in C# Pin
eggie56-Aug-03 8:42
eggie56-Aug-03 8:42 
GeneralRe: Using a C++ library in C# Pin
leppie6-Aug-03 8:35
leppie6-Aug-03 8:35 
Generalin Add-in Project Pin
don7cry5-Aug-03 22:30
don7cry5-Aug-03 22:30 
GeneralWeb Browser & TabPage Issue Pin
User 4624785-Aug-03 21:21
User 4624785-Aug-03 21:21 
GeneralRe: Web Browser & TabPage Issue Pin
monrobot136-Aug-03 3:09
monrobot136-Aug-03 3:09 
GeneralMultiple Inheritance Pin
J. Dunlap5-Aug-03 18:59
J. Dunlap5-Aug-03 18:59 
GeneralRe: Multiple Inheritance Pin
Furty5-Aug-03 21:29
Furty5-Aug-03 21:29 
GeneralRe: Multiple Inheritance Pin
tidge6-Aug-03 4:43
tidge6-Aug-03 4:43 
GeneralRe: Multiple Inheritance Pin
tidge6-Aug-03 4:45
tidge6-Aug-03 4:45 
Generalhowto search SQL Server Pin
don7cry5-Aug-03 16:47
don7cry5-Aug-03 16:47 
GeneralRe: howto search SQL Server Pin
Alex Korchemniy5-Aug-03 18:31
Alex Korchemniy5-Aug-03 18:31 
GeneralRe: howto search SQL Server Pin
don7cry5-Aug-03 20:31
don7cry5-Aug-03 20:31 
GeneralRe: howto search SQL Server Pin
Alexander Kojevnikov5-Aug-03 23:27
Alexander Kojevnikov5-Aug-03 23:27 
GeneralRe: howto search SQL Server Pin
Alexander Kojevnikov6-Aug-03 3:38
Alexander Kojevnikov6-Aug-03 3:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.