Đang chuẩn bị liên kết để tải về tài liệu:
Programming HandBook part 85
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Tham khảo tài liệu 'programming handbook part 85', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Public Property Year As Integer Get Return year End Get Set year value End Set End Property Private year As Integer get return year set year value mt ye ar Public Function IsLeapYear year As Integer As Boolean Returndi year Hod 4 0 Then True Else False End Function IsLeapYear Public Sub SetDate day As Integer Bonth As Integer year As Integer Ke. day day Me.month month Me.year year End Sub SetDate End Class Date public bool IsLeapYear int year return year 4 0 true false public void SetDate int day mt month int year 1 this.day day this.month month this.year year Delegates Events Vfi.NET Delegate Suh HsgArrivedEventHandler ByVai message As String Event HsgArrivedEvent AS Hs gAr r ive dEvent Handle r or to define an event which declares a delegate implicitly Event HsgArrivedEvent ByVai message As String AddHandler HsgArrivedEvent AddressOf Hy_HsgAr r ive dCallh ack cn t throw an exception if oh1 is Nothing RaiseEvent HsgArrivedEvent Test message RemoveHandler HsgArrivedEvent AddressOf Hy_Ks gAr r i ve dC al J.h a ck Imports System.Windows.Forms 1WithEvents can t he used on local variable Dim WithEvents HyButton As Button HyButton New Button Private Suh HyButton_Click ByVai sender As System.Object _ ByVai e As System. Event Args HandJ.es HyButton. Click HessageBox.Show He Button was clicked Info He s s ag eB o xButt ons.OK HessageBoxIcon.Informat ion End Sub C delegate void HsgArrivedEventHandler string message event HsgArrivedEventHandler Hs gAr r ivedEvent Delegates must be used with events in HsgArrivedEvent new Hs gAr r ivedEventHandler Hy_HsgArrivedEventCallback Throws exception if obj is null HsgArrivedEvent Test message HsgArrivedEvent - new Hs gAr r ivedEventHandle r Hy _HsgArrivedEventCallback using System.Windows.Forms Button HyButton new Button HyButton.Click new System.EventHandler HyB utt on_Click private void HyButton_Click object sender. System.EventArgs e HessageBox.Show this Button was clicked tnfc HessageBoxEutt ons.OK HessageBoxIcon.Information .