i have created a classes on shapes such as triangle and circle. i am trying to create a array for the classes and call a constructor from the classes. i am able to display the elements in the array. i would like to know if im doing this correctly and if not any advice on how to do it right.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Lab2
{
class Program
{
static void Main(string[] args)
{
string[] strArray = new string[] { "GeometriceObject", "Rectangle", "Square", "Triangle", "Circle" };
for (int i = 0; i < strArray.Length; i++)
{
Console.WriteLine(strArray[i]);
}
}
}
}