How do I create a function which will accept generic object of cla开发者_StackOverflow社区ss as an argument and will also have a generic return type?
If you want the same generic for the input and return types then:
public T DoSomething<T>(T input)
If you want different generics for the input and return types then:
public TReturn DoSomething<TInput, TReturn>(TInput input)
like this:
 public T Method<T>(T param)
the method may take as manay generic parameters as are needed to specify the types of the various input and return parameters, so you may also do this:
public T1 Method<T1,T2,T3>(T1 input1, T2 input2, T3 input3);
some information on generic methods on MSDN
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论