Write an abstract class using C #

Source: Internet
Author: User

Using System;

Using System.Collections.Generic;

Using System.ComponentModel;

Using System.Data;

Using System.Drawing;

Using System.Linq;

Using System.Text;

Using System.Windows.Forms;

Namespace WindowsFormsApplication4

{

public partial class Form1:form

{

Public Form1 ()

{

InitializeComponent ();

}

Interface IPlayer

{

String Play ();

String Stop ();

String Pause ();

String Pre ();//The first skeleton?

String Next ();

}

IPlayer IPlayer;

public class Mp3:iplayer

{

public string Play ()

{

Return "Positive y in ú broadcast ¥ put?" MP3 song è qu ú!? ";

}

public string Stop ()

{

Return "Stop 1 broadcast ¥ put?" MP3 song è qu ú!? ";

}

public string Pause ()

{

Return "Temporary y stop sowing ¥ to put?" MP3 song è qu ú!? ";

}

public string Pre ()

{

Return "broadcast ¥ put?" first 罬 P3 song è qu ú!? ";

}

public string Next ()

{

Return "Sow ¥ next?" First 罬 P3 song è qu ú!? ";

}

}

public class Avi:iplayer

{

public string Play ()

{

Return "Positive y in ú broadcast ¥ put?" Avi song è qu ú!? ";

}

public string Stop ()

{

Return "Stop 1 broadcast ¥ put?" Avi song è qu ú!? ";

}

public string Pause ()

{

Return "Temporary y stop sowing ¥ to put?" Avi song è qu ú!? ";

}

public string Pre ()

{

Return "broadcast ¥ put?" first 罙 vi song è qu ú!? ";

}

public string Next ()

{

Return "Sow ¥ next?" First 罙 vi song è qu ú!? ";

}

}

private void Button7_click (object sender, EventArgs e)

{

Avi avi = new avi ();

iplayer = (iplayer) avi;

}

private void Button3_Click (object sender, EventArgs e)

{

Label1. Text + = iplayer. Pause ();

}

private void Button1_Click (object sender, EventArgs e)

{

MP3 mp3 = new MP3 ();

iplayer = (iplayer) mp3;

}

private void Form1_Load (object sender, EventArgs e)

{

}

private void Label1_click (object sender, EventArgs e)

{

}

private void Button2_Click (object sender, EventArgs e)

{

Label1. Text + = iplayer. Pre ();

}

private void Button4_Click (object sender, EventArgs e)

{

Label1. Text + = iplayer. Play ();

}

private void Button5_click (object sender, EventArgs e)

{

Label1. Text + = iplayer. Pause ();

}

private void Button6_click (object sender, EventArgs e)

{

MP3 m = new MP3 ();

Label1. Text + = iplayer. Next ();

}

}

}

Write an abstract class using 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.