Vishnu V

Vishnu V

  • 1.9k
  • 114
  • 2.4k

substring split C#

Oct 8 2021 6:57 AM

Some One Help In C# 

Print --below list

List<string> AuthorList = new List<string>();  
  
// Add items using Add method   
AuthorList.Add("Name :Mahesh Chand,Adress:Hyd");  
AuthorList.Add("Name:Praveen Kumar,Adress:Pune");  
AuthorList.Add(" ");  
AuthorList.Add("Name:Nipun Tomar,Adress:Delhi");  
AuthorList.Add("Name:Dinesh Beniwal");  

And I want Print  Author Name

Output:

Mahesh Chand

Praveen Kuma

Nipun Tomar

and City 

Output:

Hyd

Pune

Delhi


Answers (8)