Click or drag to resize
EventArgsT1, T2 Class
Brings a quick and easy possibility to pass data with the EventHandler delegate.
Inheritance Hierarchy
SystemObject
  SystemEventArgs
    DW.SharpToolsEventArgsT1
      DW.SharpToolsEventArgsT1, T2
        DW.SharpToolsEventArgsT1, T2, T3

Namespace: DW.SharpTools
Assembly: DW.SharpTools (in DW.SharpTools.dll) Version: 2.4.0.0 (2.4.0.0)
Syntax
C#
public class EventArgs<T1, T2> : EventArgs<T1>

Type Parameters

T1
The first type of the containing data.
T2
The second type of the containing data.

The EventArgsT1, T2 type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyValue2
Gets the second data passed with the EventHandler delegate.
Top
Examples
C#
public class Demo
{
    public event EventHandler<EventArgs<string, string>> FileMoved;

    private void MoveFile()
    {
        var sourceFile = @"C:\Source.txt";
        var destinationFile = @"C:\Destination.txt";

        File.Move(sourceFile, destinationFile);
        OnFileMoved(sourceFile, destinationFile);
    }

    private void OnFileMoved(string source, string destination)
    {
        var handler = FileMoved;
        if (handler != null)
            handler(this, new EventArgs<string, string>(source, destination));
    }
}
See Also