Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

Using Yield Return to mass copy a Class instance

Language: Layout:
+ ] Show input
Compilation time: 0,17 sec, absolute running time: 0,08 sec, cpu time: 0,08 sec, average memory usage: 12 Mb, average nr of threads: 3 
edit mode |  history  | discussion
Use-Case Scenario:
A customer submits information on the details of 100 products they want created
All of the products will have the same type, and price, but each will need to be named afterword
How do i take a instance of information and mass clone it?
ProductList now has 100 items!
And to prove they are independent of eachother...
Chair
Tv Stand

    
                
λ
.NET NoSQL database for rapid development