Search:

Type: Posts; User: Norm

Search: Search took 0.09 seconds.

  1. Replies
    12
    Views
    1,250

    Re: how to do dynamic casting for all datatypes

    To call the methods with the same names but different data types for its args,
    either define overloaded methods each with the desired data type
    or use generics and define a class to handle the...
  2. Replies
    12
    Views
    1,250

    Re: how to do dynamic casting for all datatypes

    Have you tried writing the code using generics? The code in post#1 does not use generics. Try rewriting the code to use generics.
    For example:

    public class MethodsExample<T> {

    ...
    ...
  3. Replies
    12
    Views
    1,250

    Re: how to do dynamic casting for all datatypes

    Are you talking about method overloading? Having multiple methods with the same name but different parameters?
Results 1 to 3 of 3