csharp list string initialize inline

Code Example - csharp list string initialize inline

                
                        List<string> games = new List<string>() { "Doom",  "Tetris", "City of Heroes" }
                    
                
 

csharpl list initialize

                        
                                List<string> mylist = new List<string>(new string[] { "element1", "element2", "element3" });
                            
                        
 

Related code examples