31 lines
833 B
C#
31 lines
833 B
C#
using System;
|
|
|
|
namespace DevexpressPatchKeygen
|
|
{
|
|
// Define a delegate type (instead of deriving from MulticastDelegate)
|
|
public delegate void Collection(object sender, EventArgs e);
|
|
|
|
// Use the delegate as intended in your code
|
|
public class ExampleClass
|
|
{
|
|
public Collection collectionDelegate;
|
|
|
|
public ExampleClass()
|
|
{
|
|
// Example usage of Collection delegate
|
|
collectionDelegate = new Collection(HandleEvent);
|
|
}
|
|
|
|
public void HandleEvent(object sender, EventArgs e)
|
|
{
|
|
Console.WriteLine("Event handled");
|
|
}
|
|
|
|
public void InvokeEvent()
|
|
{
|
|
// Use the delegate to invoke the event handler
|
|
collectionDelegate.Invoke(this, EventArgs.Empty);
|
|
}
|
|
}
|
|
}
|