Converting Generic List to Array using C#

In this Blog we are going to see. How to Convert Generic List to ARRAY using C#
Used Namespace:
using System.Collections.Generic;
Code Snippet:

        /// This Converts List To Array
        /// </summary>
        public void ConvertingListTOArray()
            //Adding item to the List
            List<string> list = new List<string>();
            //Convert List to Array
            Array array = list.ToArray();
            //Convert List to Array
            string[] array1 = list.ToArray();
            //Displaying the Array Value.
            foreach (string s in array1)



Thanks for reading this article. Have a nice day.