c# - Shim Custom Dictionary -
i have created class extension of dictionary class, looks follows:
public class pkmrelations : dictionary<guid, pkmrelation>, idisposable
i want shim count method of pkmrelations, returns value want. add few elements, not possible because of current configuration.
currently unable figure out how shim count method of dictionary. able have create shim of specific generic dictionary class.
is @ possible, , if how can this?
count not virtual method in dictionary, cannot override it! can use new keyword. so, can add following propety
new int count { { //your intercept code here return base.count; } }
Comments
Post a Comment