I’m refactoring some code I inherited from a long-gone developer, and I find this:
ImportExportForm l_Form = new ImportExportForm(); l_Form.InitializeLifetimeService(); l_Form.ShowDialog();
I’ve never seen or used the LifetimeService before, but from the little I’ve read, I don’t understand why I would want to use it here, but before saying WTF, I wondered if I might be missing some subtle detail?
As far as I know this is a method normally use for Remote .Net Objects, and to establish the lifetime of an instance. Look here:
http://msdn.microsoft.com/es-es/magazine/cc300474(en-us).aspx
I don’t think that it’s important for normal Windows Form.