Tarun Rajak

Tarun Rajak

  • 1.3k
  • 461
  • 342.6k

How to do recursive call of a generic T type param method?

Apr 7 2018 5:31 PM
How to do recursive call of a function having generic type parameter? for example: public T Deserialize(string json) { //// How can I do recursive call here? where type T is dynamic here. } Let a class Student public class Student { public Name FullName {get; set;} public int RollNo {get; set;} } public class Name { public string FirstName {get; set;} public string LastName {get; set;} } Now calling method: Deserialize(json)here how can I do recursive call to deserialize object Name.

Answers (3)