vb.net - Access derived class from base class shared function -


i rewrite function avoid need generic parameter because should available through other means given redundancy of how function called (t should refer class on function called):

public shared function fmxsize(of t {new, filestructure})() integer   dim result integer   if sizecache.trygetvalue(gettype(t), result) return result   result = (new t()).calculatesize()   sizecache(gettype(t)) = result   return result end function 

it called current implementation (note: libctl inherits filestructure):

return libctl.fmxsize(of libctl)() 

or ideal implementation (since above looks redundant):

return libctl.fmxsize() 


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -