Coding Thread, C# Clarification in Coding and Web Development; So i've been programming for years, C# for several and never came across the need todo this. Now I do ...
-
24th September 2008, 09:39 AM #1 C# Clarification
So i've been programming for years, C# for several and never came across the need todo this. Now I do and I cant think how the hell to do it, let alone what it's called (so I cant google how to to it).
Ok, so I have 2 classes. One is inherited from a UserControl, and the other is inherited from that:
Code:
public class ParentPanel : UserControl {
public ParentPanel() { InitializeComponent(); }
public void DoClearup() {
// stuff here etc
}
}
public class DisplayReg : ParentPanel {
} Ok, what i want (which i'm sure i've seen elsewhere) is for DisplayReg to have to impliment DoCleanup().
Anyone know how to do this? Or know of the term used to describe it?
Cheers
Last edited by stratisphere; 24th September 2008 at 09:46 AM.
Reason: Added code tags - 2nd: Dam Typos
-
-
IDG Tech News
-
24th September 2008, 10:05 AM #2 Declare it abstract, don't you? or maybe virtual, I don't remember. However, abstract will mean that you can't create any instances of the base class, so caution.
-
Thanks to powdarrmonkey from:
stratisphere (24th September 2008)
-
24th September 2008, 10:32 AM #3 Thats the one, needed to declare the method abstract. Cheers buddy.
I dont need to create any instances, just simply need to inherit from it to make the code a little cleaner and more effecient
-
SHARE:
Similar Threads
-
By Adam_C in forum MIS Systems
Replies: 17
Last Post: 25th October 2007, 08:03 AM
-
By ICTNUT in forum Networks
Replies: 26
Last Post: 28th June 2007, 01:28 PM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules