This is a migrated thread and some comments may be shown as answers.

RadDesktopAlert - derived class, compiler error

2 Answers 67 Views
DesktopAlert
This is a migrated thread and some comments may be shown as answers.
Ramius
Top achievements
Rank 1
Ramius asked on 23 Jun 2010, 09:28 AM
Hello,

I derived a new class from the RadDesktopAlert class and there i get this compiler error when i try to compile it:

    public partial class BITDesktopAlert : RadDesktopAlert  
    {  
        protected override void Dispose( bool disposing )  
        {  
            if ( disposing && ( components != null ) )  
            {  
                components.Dispose( );  
            }  
            base.Dispose( disposing );  
        }  
     }  
 

Compiler error message:
Fehler 1 "BITSteuerelemente.BITDesktopAlert.Dispose(bool)": Der geerbte Member "Telerik.WinControls.DisposableObject.Dispose(bool)" kann nicht überschrieben werden, weil er nicht als "virtual", "abstract" oder "override" markiert ist. 

Is it not possible to override the Dispose method ?

Kind Regards,

Ramius

2 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 28 Jun 2010, 05:15 PM
Hi Ramius,

Thanks for contacting us and for your question.

Please use the DisposeManagedResources() method to perform your cleanup logic. This method is virtual and can be overriden in descendant classes.

I hope this helps.

All the best,
Deyan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ramius
Top achievements
Rank 1
answered on 29 Jun 2010, 10:00 PM
Hi Deyan,

thank you for your help.

This works fine now.

Kind Regards,

Ramius
Tags
DesktopAlert
Asked by
Ramius
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Ramius
Top achievements
Rank 1
Share this question
or