diff --git a/GongSolutions.Wpf.DragDrop/DropTargetInsertionAdorner.cs b/GongSolutions.Wpf.DragDrop/DropTargetInsertionAdorner.cs
index 1caf3055..56361a1e 100644
--- a/GongSolutions.Wpf.DragDrop/DropTargetInsertionAdorner.cs
+++ b/GongSolutions.Wpf.DragDrop/DropTargetInsertionAdorner.cs
@@ -1,13 +1,10 @@
using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-using System.Text;
using System.Windows;
-using System.Windows.Data;
using System.Windows.Media;
using System.Windows.Controls;
-using System.Collections;
+#if NET35
+using GongSolutions.Wpf.DragDrop.Utilities;
+#endif
namespace GongSolutions.Wpf.DragDrop
{
diff --git a/GongSolutions.Wpf.DragDrop/Utilities/TypeUtilities.cs b/GongSolutions.Wpf.DragDrop/Utilities/TypeUtilities.cs
index ae8edc12..a6a1a27a 100644
--- a/GongSolutions.Wpf.DragDrop/Utilities/TypeUtilities.cs
+++ b/GongSolutions.Wpf.DragDrop/Utilities/TypeUtilities.cs
@@ -1,14 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Text;
using System.Collections;
-using System.Reflection;
namespace GongSolutions.Wpf.DragDrop.Utilities
{
- public class TypeUtilities
+ public static class TypeUtilities
{
+#if NET35
+ ///
+ /// Check to see if a flags enumeration has a specific flag set.
+ ///
+ /// Flags enumeration to check
+ ///
+ public static bool HasFlag(this Enum variable, Enum flag)
+ {
+ if (variable == null) {
+ return false;
+ }
+
+ if (flag == null) {
+ throw new ArgumentNullException("flag");
+ }
+
+ if (flag.GetType() != variable.GetType()) {
+ throw new ArgumentException(string.Format("Enumeration type mismatch. The flag is of type '{0}', was expecting '{1}'.", flag.GetType(), variable.GetType()));
+ }
+
+ var uFlag = Convert.ToUInt64(flag);
+ var uVar = Convert.ToUInt64(variable);
+ return ((uVar & uFlag) == uFlag);
+ }
+#endif
+
public static IEnumerable CreateDynamicallyTypedList(IEnumerable source)
{
var type = GetCommonBaseClass(source);