Ganesh Machine Tools a company dedicated to the supply of quality tool room, production CNC and conventional machines was established in the year 1994 by our founder late Shri.V.K.
When overriding one method with another, the signatures of the two methods must be identical (and with same visibility). In C#, class methods, indexers, properties and events can all be overridden. Non-virtual or static methods cannot be overridden. The overridden base method must be virtual, abstract, or override. In addition to the modifiers that are used for method overriding, C# allows the hiding of an inherited property or method. This is done using the same signature of a property or method but adding the modifier new in front of it.
Extension methods are static methods, and you can't override a static method. Nor can you override an actual instance method with a static/extension method.You'll have to use your optimized extension explicitly. Or implicitly by referencing your own extension's namespace instead of System.Linq.Or explicitly check the type in your extension and call the correct one based on the runtime type.o make this even clearer, have a look at this code from the System.Linq.Enumerable class out of Reflector: This is one of the core extension methods in the .NET Framework. It allows optimization by explicitly checking if the parameter implements.