I am working on wpf application and i have to pass some global objects from one class to other, so i am declaring a parameterized construtor for the class,
my concern is which one would performance better as a parameter , dictionary or hashtable.
i read this post Difference between Dictionary and Hashtable
following code is using hashtable
public partial class Sample: Window
{
Hashtable session = new Hashtable();
string Path= string.Empty;
string PathID= string.Empty;
public Sample(Hashtable hashtable)
{
if (session != null)
{
this.session = hashtable;
Path= session["Path"].ToString()
PathID= session["MainID"].ToString();
}
InitializeComponent();
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
}
}