using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace TEST
{
public delegate bool processServ(string s1, ref string s2);
public class c1
{
public string s = "1";
public void test( string s1,ref string s2,processServ serv)
{
if (serv(s1,ref s2))
{
s = "2";
}
}
}
abstract public class c2:c1
{
public void query(string s1,ref string s2)
{
test(s1, ref s2, new processServ(service));
}
public abstract bool service(string s1, ref string s2);
}
public class c3:c2
{
public override bool service(string s1 , ref string s2)
{
return true;
}
}
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string aa = "";
new c3().query("aa",ref aa);
}
}
}
回复Comments
{commenttime}{commentauthor}
{CommentUrl}
{commentcontent}