Tuesday, 1 October 2019

C# Concept of using string

C# Concept of using string
using System;
namespace ConsoleApplicationSample
{
    class ArrayBCA
    {
        #region Array_Search
        public static void Main()
        {
            string[] week = new string[7];
            week[0] = "Sunday";
            week[1] = "Monday";
            week[2] = "Tuesday";
            week[3] = "Wednsday";
            week[4] = "Thursday";
            week[5] = "friday";
            week[6] = "Saturday";
            string value = "Wednsday";
            int pos = Array.IndexOf(week, value);
            if (pos > -1)
                Console.WriteLine(value + " exist !");
            else
                Console.WriteLine(value + " not exist !");
            Console.ReadKey();
        }
        #endregion
        }       
    }
}
https://www.youtube.com/channel/UCKLRUr6U5OFeu7FLOpQ-FSw/videos

0 comments

Post a Comment