That's a nice 2008 enhancement,
Christiaan, thanks for all your help..I appreciate it..
I'm not sure what you mean by using parameters? I need to create a class that behaves in a similar fashion to the TestExtensionMethods example that stsuing demonstrated..any pointers?
Thanks Mark
Hi Christaan,
Yes, that's right, we also need to some processing of other datatypes when we call ToString to ensure that the resultant string is in the correct format to form part of the where clause...
I think you helped me see the basic mistake where I had one class that exhibited different...
Hi Christaan, you're correct the actual implementation is more complex than the example.
Basically, I have a class that represents part of a 'filter' that is to be applied to a sql server where clause. In this case the value that is to be used against a certain field.
So if the user creates a...
Hi Christaan,
thanks for the reply, is this the kind of thing that could be solved using inheritance?
Splitting the very different behavior into an abstract parent class and two subclasses classes, one for the int and another to deal with the datetime ?
the individual classes would then be...
Hi Graeme, thanks for the reply,
When I was investigating this issue, I kind of got to the same point as your class.
the problem I encountered was in the ToString method where I have to cast the generic type, _value, to a datetime in order to format the string that represents the date...
Hi I wonder if somebody could point me in the right direction with this problem?
I've got the follow class, which is using an object as a paramter in order to represent a variety of types, in this example ints and datetimes.
public class MyClass
{
private object _value;
public...
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.