Tuesday, 29 May 2018

Hash set Generic Class in C#





using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;



namespace ConsoleApplication32

{

    class Program

    {

        static void Main(string[] args)

        {



            var x = new HashSet<string>();



            x.Add("ali");

            x.Add("AHMED");

            x.Add("ali"); //DUPLICATE......

            x.Add("ARIF");

            x.Add("ASIM");





            foreach (var item in x)

            {

                Console.WriteLine(item);

            }



            Console.ReadLine();





        }

    }

}


No comments:

Post a Comment

Pass Dynamically Added Html Table Records List To Controller In Asp.net MVC

Controller Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ...