13 lines
300 B
C#
13 lines
300 B
C#
using System;
|
|
using System.Reflection;
|
|
|
|
namespace Reflex.Extensions
|
|
{
|
|
internal static class MethodInfoExtensions
|
|
{
|
|
public static T CreateDelegate<T>(this MethodInfo methodInfo) where T : Delegate
|
|
{
|
|
return (T) methodInfo.CreateDelegate(typeof(T));
|
|
}
|
|
}
|
|
} |