I’m working with Telerik RadScheduleView and have implemented the IAppointment class into a child ‘Job’ class that I have defined. The ‘Start’ and ‘End’ (DateTimes) properties are found in the IAppointment class (of which I inherit). Navigating to the ‘Public Virtual’ method (in the IAppointment class) shows me a { get; set; } but I can’t change it to say, for example, display a MessageBox on setting a new value to Start or End. It says MetaData in the tab, is this just something I am not able to edit? Is there a way I can override this access method somehow??
I’m working with Telerik RadScheduleView and have implemented the IAppointment class into a child
Share
The name
IAppointmentwould indicate to me that it is not a class you are inheriting, but an interface you’re implementing – however, I’m not familiar with Telerik products and their naming conventions might just be weird, so, taking what you say at face value, yes you ought to be able to override a property defined as virtual.If, for example, we have the following class defined somewhere, but accessible, so that we may inherit, and which exposes a
virtualmember:Then we can inherit and
override– we may still access the base implementation, but also “inject” our own, if required:But I can’t for the life of me imagine why you’d want to show a message box from within the logic of property accessors, and can’t stress enough that you shouldn’t.