C#?????????о?
???????????? ???????[ 2012/8/16 11:13:56 ] ????????
???????????????????????????????????????????????????????????????????????????е??÷?????????????????????????????????????????????????????????????????????????????????????y??????
????????????????????????
???????????????????????????
internal delegate void Feedback(Int32 value);
????C#?????????????????????????????????????MulticastDelegate????
internal class Feedback : System.MulticastDelegate
{
// Constructor
public Feedback(Object object?? IntPtr method);
// Method with same prototype as specified by the source code
public virtual void Invoke(Int32 value);
// Methods allowing the callback to be called asynchronously
public virtual IAsyncResult BeginInvoke(Int32 value??
AsyncCallback callback?? Object object);
public virtual void EndInvoke(IAsyncResult result);
}
????MulticastDelegate?????Delegate???????????????????
public abstract class Delegate : ICloneable?? ISerializable
{
protected Delegate(object target?? string method);
protected Delegate(Type target?? string method);
public static bool operator !=(Delegate d1?? Delegate d2);
public static bool operator ==(Delegate d1?? Delegate d2);
public MethodInfo Method { get; }
public object Target { get; }
public virtual object Clone();
public static Delegate Combine(params Delegate[] delegates);
public static Delegate Combine(Delegate a?? Delegate b);
protected virtual Delegate CombineImpl(Delegate d);
public static Delegate CreateDelegate(Type type?? MethodInfo method);
public static Delegate CreateDelegate(Type type?? MethodInfo method?? bool throwOnBindFailure);
public static Delegate CreateDelegate(Type type?? object firstArgument?? MethodInfo method);
public static Delegate CreateDelegate(Type type?? object target?? string method);
public static Delegate CreateDelegate(Type type?? Type target?? string method);
public static Delegate CreateDelegate(Type type?? object firstArgument?? MethodInfo method?? bool throwOnBindFailure);
public static Delegate CreateDelegate(Type type?? object target?? string method?? bool ignoreCase);
public static Delegate CreateDelegate(Type type?? Type target?? string method?? bool ignoreCase);
public static Delegate CreateDelegate(Type type?? object target?? string method?? bool ignoreCase?? bool throwOnBindFailure);
public static Delegate CreateDelegate(Type type?? Type target?? string method?? bool ignoreCase?? bool throwOnBindFailure);
public object DynamicInvoke(params object[] args);
protected virtual object DynamicInvokeImpl(object[] args);
public override bool Equals(object obj);
public override int GetHashCode();
public virtual Delegate[] GetInvocationList();
protected virtual MethodInfo GetMethodImpl();
public virtual void GetObjectData(SerializationInfo info?? StreamingContext context);
public static Delegate Remove(Delegate source?? Delegate value);
public static Delegate RemoveAll(Delegate source?? Delegate value);
protected virtual Delegate RemoveImpl(Delegate d);
}
????????????????????????????????п????????????潫???г?
???????????????????????
??????????????????????????????????????????
Feedback fbInstance = new Feedback(new Program().FeedbackToFile);
?????????????C#?汾???????????????????й???????????????????????????????????????????????C#3.0?п?????????????????lambda??????????????????????
?????????????????????????
????????????????????????????????????Invoke????BeginInvoke???????????????????????????????????á?
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11