0
Does an array in C# can elements more than a single data type, simultaneously?
Like: An array : {23, "Rohan" , 23.232 , 2.2}
1 Resposta
+ 4
You can do that by creating an array of object type.
object[] arr = {1,"string",2.2,true};
foreach(object x in arr)
Console.WriteLine(x);