private void OnImport() { SaveFileDialog dialog = new SaveFileDialog(); if (dialog.ShowDialog() ?? false) { try { if (dialog.Path != null && Directory.Exists(Path.GetDirectoryName(dialog.Path))) { string data = File.ReadAllText(dialog.Path); IEnumerable <Account> accounts = DataSerializer.DeserializeFromCsv <Account>(data); } CurrentViewModel = _accountDetailsViewModel; } catch (Exception ex) { Logger.LogException(ex); } } }