イベントのドリブン
public class Class1 public event Change(byval sender As Object, byval e As EventArgs) private function foo(byval bar as integer) as boolean RiaseEvent Change(me, new EventArgs) end function end class
・EventAtgsを継承して独自のイベントクラスを生成可能
public class myEventArgs Inherits System.EventArgs dim strMsg As string public property msg as string get return strMsg end get set(byval value as string) strMsg = value end set end property end class public class Class2 public event Change2(byval sender As Object, byval e As myEventArgs) public function foo2 as boolean dim obmyEventArgs as new myEventArgs obmyEventArgs.msg = "Raised" RiaseEvent Change2(me, obmyEventArgs) end function end class