initial commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user