public delegate void TestDelegate(); // delegate declaration public interface ITestInterface { event TestDelegate TestEvent; void FireAway(); } public class TestClass : ITestInterface { public event TestDelegate TestEvent; public void FireAway() { if
基类: Public Class userFun Private Shared _PnlStatus As String ‘必须设为共享字段,如果不设为Shared,将不能传递字符串内容 Public Delegate Sub EventHandler() Public Shared Event PnlStatusChanged As EventHandler ’共享事件,如果不设为Shared,将不能触发主窗体中的事件 Public Property PnlStatus As String ‘
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta h