From 993d62533046c54262d25979b38355498df85e4d Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Wed, 30 Aug 2023 18:44:59 +0200 Subject: [PATCH] TreeNodeExtensions - Added constraints to generic type --- PCK-Studio/Extensions/TreeNodeExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PCK-Studio/Extensions/TreeNodeExtensions.cs b/PCK-Studio/Extensions/TreeNodeExtensions.cs index 756ece05..0fab1fcd 100644 --- a/PCK-Studio/Extensions/TreeNodeExtensions.cs +++ b/PCK-Studio/Extensions/TreeNodeExtensions.cs @@ -9,12 +9,12 @@ namespace PckStudio.Extensions { internal static class TreeNodeExtensions { - internal static bool IsTagOfType(this TreeNode node) + internal static bool IsTagOfType(this TreeNode node) where T : class { return node.Tag is T; } - internal static bool TryGetTagData(this TreeNode node, out TOut tagData) + internal static bool TryGetTagData(this TreeNode node, out TOut tagData) where TOut : class { if (node?.Tag is TOut _data) {