Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. threexmods

    Help with implementing Generics

    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
  2. threexmods

    Help with implementing Generics

    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...
  3. threexmods

    Help with implementing Generics

    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...
  4. threexmods

    Help with implementing Generics

    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...
  5. threexmods

    Help with implementing Generics

    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...
  6. threexmods

    Help with implementing Generics

    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...

Part and Inventory Search

Back
Top