-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: SitaramanM
Message 3 in Discussion

Hi   What exactly do you mean by modification.  Does it mean that they will 
alter/extend the functionality of 4 functions. In that case you write your control 
(lets say Control X)deriving it from System.Web.UI.UserControl and create a dll.  The 
users of the control in turn will create their control(ControlY) deriving from the 
control(ControlX) you have created and then alter the fucntionalities by overriding 
the same.  Finally in the aspx pages you will embed the developer's control(ControlY)  
 Akshit : Did not understand "use protect for the methods and for other give public".  
 do you mean protected for the 4 methods and public for others,  then the other 
methods which should not be modifiable becomes fully free for modification???   Do 
note that this inheritence funda anyways wont stop from the developers from 
overwriting your methods.  Whereas from the object oriented perspective you will mark 
the 4 methods as overridable and  your derived control developers will override(s) the 
methods,  the shadows keyword(which is the default functionality and will just show 
you a compiler warning if you dont mention it explicitly) functionality will allow the 
developer to overwrite any base class defined functionality   For example If i have a 
code    Module Module1     Sub Main()
        Dim x As New Derived()
        x.fn1() ' will Print "Derived Class Function Invoked"
        Console.ReadLine()
    End Sub End Module 
Class Base
    Function fn1()
        Console.WriteLine("Base Class Function Invoked")
    End Function End Class Class Derived
    Inherits Base
    Function fn1() ' Compiler warning will show, though code will execute. To avoid 
compiler warning declare function as "Shadows Function fn1()"
        Console.WriteLine("Derived Class Function Invoked")
    End Function End Class    So here even though the base class doesnt mark the 
function as overridable, the derived class brutally overwrites the base class 
function(iality).  So even if you use inheritance and public/protected methods     
regards,   sr

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to