using System;
namespace ArrayTypeMismatch
{
class ClassOne
static void Main(string[] args)
string[] numbers = { "One", "Two", "Three" }; // (A)
Object[] objs = numbers; // (B)
try
Object obj = (Object)4; // (C)
objs[2] = obj; // (D)
Console.WriteLine(objs[2]);
}
catch (System.ArrayTypeMismatchException) // (E)
System.Console.WriteLine(
"New element is not of the correct type.");