-4
爲什麼這不起作用。下面是我的代碼:填充對象數組顯示
private static void FillCatalogue()
{
int intCatalogueNumber = 0;
arrMyShows = new Show[intCatalogueNumber];
Show newShow = new Show();
//arrMyShows[intCatalogueNumber] = newShow;
Console.Clear();
Console.Write("Title: ");
arrMyShows[intCatalogueNumber].Title = Console.ReadLine();
Console.Write("Year: ");
arrMyShows[intCatalogueNumber].Year = Convert.ToInt32(Console.ReadLine());
Console.Write("Lead Actor: ");
arrMyShows[intCatalogueNumber].LeadActor = Console.ReadLine();
Console.Write("Price: ");
arrMyShows[intCatalogueNumber].RentalPrice = Convert.ToDouble(Console.ReadLine());
//Console.Write("Does the show have Blu-Ray discs? (Y/N) ");
Console.WriteLine(arrMyShows[intCatalogueNumber].Title + " " + arrMyShows[intCatalogueNumber].Year + " " + arrMyShows[intCatalogueNumber].LeadActor);
有什麼異常?請讓'not working'更具體。 –
我沒有得到任何例外。在運行程序時它會進入中斷點。 –
我無法找出例外 –