Atitit Multiple Inheritance Implementation solution Java C #

Source: Internet
Author: User

Atitit Multiple Inheritance Implementation Solution Java C #

Java C # does not provide a multiple-inheritance solution: The default is from the language level and no way to inherit more .

only the level of the Cub Class library can be implemented pull .

the principle of inheritance is to use an internal super Pointer to point to the Superclass. We can define multiple Super hands Away OK LAN ..

Atitit using internal classes to implement multiple inheritance

use to define multiple super pointers for implementation :

Super name , or super prefix , number . Middle IDE Easy Hints Inside. ..

of course, without native language support, there is a level of invocation, a bit more hassle. But it would be nice to have a super prefix, too.

Package com.alipay.config;

public class Multiinherson extends MultiInherParent1 {

MultiInherParent2 super_prt2=new MultiInherParent2 ();

MultiInherParent1 super_prt3=new MultiInherParent1 ();

public static void main (string[] Args) {

Multiinherson son=new Multiinherson ();

SON.M1 ();

SON.SUPER_PRT2.M2 ();

SON.SUPER_PRT3.M1 ();

}

author::  Nickname :Old Wow's Claws( Full name::AttilaxAkbar Al Rapanui Attilaksachanui) 

Kanji name: Etila ( Ayron) , email:[email protected]

reprint please indicate source: http://www.cnblogs.com/attilax/

Atiend

Atitit Multiple Inheritance Implementation solution Java C #

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.