 In Cshar, can we combine two collection objects and then generate custom objects from them? If yes, then what is the best way? Hello there, this is Krishnanj Rana from Bitescout and in this video we will be going to learn about how we can combine two collection objects and then iterate over it by generating one logical collection using link use RIP method. Well, if you are from python background then zip may be familiar for you. The zip is an extension method in the linku namespace which allows us to join two collection objects together. Here is the basic declaration of zip extension method. This extension method takes the second collection object and it pairs each element in the two collection together based on position and this function will perform the actual merging. Now without go much into the theory, let's see the zip method in action. Alright, so here in this code, our first collection object consists of patient name and we will be going to merge this object with patient disease history and for each parameter of item in the sequences, we will execute this combined object data function and return the resulting data into this patient disease list object. And then over here, I have explicitly called these two list method to force the evolution so that we can see the combined list in use. Now let's run this demo. So here we can see that our combined data object method is called and in the parameter for the first time you can see the John Doe as patient name, which is the first item over here and then in the disease name, you can see the Asthma, which is the first item in this disease history object. Now let me click on this continue button and now for the second object, we will get the patient name as Anna Smith, which is over here and the disease name as skin infection, which is the second item in this disease history object and same way for the third item, which is Peter Jones as a patient. Now let me put one more breakpoint over here and let's click on continue. So now let's see the final result in this object. So here we have got the three strings as expected and then we will write this three string object into the console using this forage method. So now let's click on continue and you can see our combined object as output in this console. So this is how we have effectively zipped the two collection object into one logical object. Now what happened if these two collection objects have different length? I mean let's say if I add one more patient name over here, but I have not added the fourth item in this disease history object. Now let's run this app again and see what happened. Now as you can see that we have got the same output as before, but not that we don't have a Peter Parker in this list and that is because the zip method ran out of disease object after it got a Peter Jones. So this means that the zip extension method stops when it runs out of items in one of the two sequences.