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

Popular posts from this blog

asp.net mvc 3 - Using mvc3, I need to add a username/password to the sql connection string at runtime -

kineticjs - draw multiple lines and delete individual line -

thumbnails - jQuery image rotate on hover -