RcBuilder@walla.com
call centre: 054-5614020

abstract, virtual and override methods

Posted by: RcBuilder  /   Category: abstract / inheritance / OOP / override / virtual   /   No Comments
27
Nov
2014

abstract, virtual and override methods public abstract class Parent { /* can only defined within an abstract class!! method with no body ! must be implemented (override) in all the inherited classes */ public abstract void fun1(); public virtual void fun2() { Console.WriteLine("Parent.FUN2"); } // can't be overridden (not an abstract, virtual or override) public new void fun3() { Console.WriteLine("Parent.FUN3"); } // can't be overridden (not.

Read more

override static methods

Posted by: RcBuilder  /   Category: OOP / override / SOURCE CODE / Static   /   No Comments
26
Nov
2014

override static methods // a static method belong to the instance of the type itselt (ChildA, ChildB etc.) public class TEST { public class Base { public static string Fun() { return "Base"; } } public class ChildA : Base{} public class ChildB : Base { public static string Fun() { return "ChildB"; } } } USING string a1 = TEST.ChildA.Fun(); // Base string a2 = TEST.ChildB.Fun(); //.

Read more
  • פיתוח מערכות
  • פתרונות טכנולוגים
  • קידום אתרים
  • בניית אתרים