Thanks, that indeed will work to solve the problem I presented. However, I am actually looking for a way to force the developer who is implementing MyAbstractClass to implement Bar(). While shadowing the Shared method gives the developer the opportunity to implement Bar(), it will not force...
I have a situation where I need to make sure that a class implements a set of Shared methods. The context is quite complex, so I'll spare the details.
I basically have an abstract class that deals heavily with Generics. I need to call a Shared method on the Generic class T. I need to make sure...
Thanks, John. Your answer sheds light on the problem. Before reading your post, I found System.Enum.ToObject does the conversion I need. However, it caused me to introduce an IF check within the loop, which is not desirable. The smallint datatype from the database is more accurate than the...
Fixed it, but new problem now...
I found the offending line:
ILGen.EmitCall(OpCodes.Callvirt, setter, Nothing)
It should have been:
ILGen.EmitCall(OpCodes.Callvirt, setMethod, Nothing)
My new problem is that as it is setting the value of a property that return an enum, I am getting a...
I'm building an abstract class that handles some common operations for all of my data access objects. The class will utilize generics, so I can't make direct calls to constructors, business object properties, etc. Reflection is way too slow for what I want to accomplish, so I am using a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.