An XML bomb is a piece of XML code that is syntactically valid and correct but can cause a program that compiles or runs it to crash or hang. An XML bomb can be used to test the security level of a server. In an HTML code, an XML code is either parsed internally or referenced as an external file that is sent to a server. Typically, a normal server...
Override, in C#, is a keyword used to replace a virtual member that is defined in a base class with the definition of that member in the derived class.
The override modifier allows programmers to specify the specialization of an existing virtual member inherited from a base class to provide a new implementation of that member in the derived class. It can be used with a method, property, indexer or an event that needs to be modified or extended in a derived class.
The override modifier is intended to implement the concept of polymorphism in C#.
Override differs from new modifiers in that the former is used only to override a virtual member of a base class while the latter also helps to override a non-virtual member defined in a base class by hiding the definition contained in the base class.
Override is mostly used in the context of virtual method, in which the execution of a type of method is determined by the runtime type of the instance on which the method is invoked. During the invocation, the caller need not know that the called object was an instance of derived class.
For example, if Shape is a base class that provides the basic implementation that is common for all the objects of its class, it can be defined with a virtual method, CalculateArea. Square can be a class derived from Shape, which can override the CalculateArea method to implement the logic necessary for calculating the area of a square.
To override a method in a derived class:
Read More »
Join 138,000+ IT pros on our weekly newsletter
Home | Advertising Info | Write for Us | About | Contact Us
2010 - 2015
Partner Sites :