M
Mitja Semolic
// Example
public struct SomeData
{
public int X;
public int Y;
public SomeData(int x, int y)
{ ... }
}
....
Hashtable table = new Hashtable();
SomeData sd = new SomeData(1, 2)
table.Add(1, sd);
// this of course does not work, cause is passed by value
// but is there a way, or I need a class to encapsulate data types (stupid
solution)
((SomeData)table[1]).X = 2;
public struct SomeData
{
public int X;
public int Y;
public SomeData(int x, int y)
{ ... }
}
....
Hashtable table = new Hashtable();
SomeData sd = new SomeData(1, 2)
table.Add(1, sd);
// this of course does not work, cause is passed by value
// but is there a way, or I need a class to encapsulate data types (stupid
solution)
((SomeData)table[1]).X = 2;