diff --git a/WinFormsProject/WinFormsLibrary/TreeClass.cs b/WinFormsProject/WinFormsLibrary/TreeClass.cs index 04d2c23..d660e63 100644 --- a/WinFormsProject/WinFormsLibrary/TreeClass.cs +++ b/WinFormsProject/WinFormsLibrary/TreeClass.cs @@ -99,7 +99,7 @@ namespace WinFormsLibrary public T GetSelectedClass() where T : new() { - T res = new T(); + T res = default(T); TreeNode node = treeView.SelectedNode; if (node.Nodes.Count != 0)