I have a class like
public class CommonMasterDataResponse
{
public List<MyClass> dto1{ get; set; }
public List<MyClass> dto2 { get; set; }
public List<MyClass> dto3 { get; set; }
.
.
.
public List<MyClass> dto100 { get; set; }
}
I have return it from my web api method. Now i want to remove all properties which has no data. like if in web api I have assigned data to dt01 and dto2 then if I return CommonMasterDataResponse object then it render only dto1 and dto2. I am very new to c#. kinldy give me suggestion how to chieve this.