I am getting a code analysis warning from the generated GridView code in the Designer.cs file for my user controls. The error reads as follows:
In method 'MyControl.InitializeComponent()', object 'gridViewTextBoxColumn1' is not disposed along all exception paths. Call System.IDisposable.Dispose on object 'gridViewTextBoxColumn1' before all references to it are out of scope.
I know that I can use a SuppressMessage attribute, but it's appearing anywhere I use a GridView and I'd rather not litter my code with a bunch of suppressions. Is there another way to fix this?
Visual Studio 2012 Ultimate
C#, .NET 4.0
Telerik for Windows Forms 2013.2 724
In method 'MyControl.InitializeComponent()', object 'gridViewTextBoxColumn1' is not disposed along all exception paths. Call System.IDisposable.Dispose on object 'gridViewTextBoxColumn1' before all references to it are out of scope.
I know that I can use a SuppressMessage attribute, but it's appearing anywhere I use a GridView and I'd rather not litter my code with a bunch of suppressions. Is there another way to fix this?
Visual Studio 2012 Ultimate
C#, .NET 4.0
Telerik for Windows Forms 2013.2 724