/Weekdays

Indexing the weekdays (C# 6.0)

Primary LanguageC#

Weekdays

Indexing the weekdays

In Weekdays repository you can find Weekdays class, where by using indexer method weekdays were indexed from 0-6.

public string this[int index]
        {
            get
            {
                if (index > weekdays.Length && index<0)
                    throw new IndexOutOfRangeException();
                return weekdays[index];
            }
        }

The Output of executable file is the following

#Keywords C# 6.0, .Net Framework 4.6, Microsoft Visual Studio.