[Solved] Not able to print value of an array while using inheritance in C# [duplicate]


Your PrintDetails() method is printing the array without any kind of formatting (hence it’s just printing the array type)

use string.Join to print the array delimenated by commas

public override void PrintDetails()
{
   Console.WriteLine("Hi my name is " + _name + " and I am studying " + string.Join(",", _subjects));        
} 

ought to do it.

2

solved Not able to print value of an array while using inheritance in C# [duplicate]