GetData<T>

public static T GetData<T>(this AppDomain app, string name)
{
  return (T)Convert.ChangeType(app.GetData(name), typeof(T));
}
Example:
AppDomain.CurrentDomain.GetData<MyClass>("settings");

Description

Get a saved value from the app domain and convert it back to its original type

Details

Double click on the code to select all.

 

;