Subclass EventArgs : EventArgs : Development Class C# Source Code


Custom Search

C# Source Code » Development Class » EventArgs »

 

Subclass EventArgs








    
 


using System;


[Serializable]
public sealed class MailReceivedEventArgs : EventArgs {
    private readonly string from;
    private readonly string subject;

    public MailReceivedEventArgs(string from, string subject) {
        this.from = from;
        this.subject = subject;
    }

    public string From { get { return from; } }
    public string Subject { get { return subject; } }
}

public class MainClass {
    public static void Main() {
        MailReceivedEventArgs args = new MailReceivedEventArgs("D", "Y");
        Console.WriteLine("From: {0}, Subject: {1}", args.From, args.Subject);
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» EventArgs