我一直在使用在类级别声明委托的方法:
protected delegate void FieldsDelegate();
//and then write a method e.g.
protected int CreateComponent(DbConnection cnctn, string tableName, Dictionary<string, object> changedFieldValues, FieldsDelegate fieldsDelegate)
然而,这样做非常麻烦,我不能立即看到代理的情况。因此,我希望像这样做:
protected int CreateComponent(DbConnection cnctn, string tableName, Dictionary<string, object> changedFieldValues, delegate void fieldsDelegate())
为了避免单独定义,我希望能进行如上所述的操作。
由于某些原因,上述操作是不被允许的。那么我该怎么做呢?
FieldsDelegate
中的后缀Delegate
已经是一个非常好的指示器了。 - H H