سلام

کسی می تونه به من بگه از کالکشن
doors
در این کد چه استفاده ای می شه کرد؟؟؟؟
classroom
{
publicdecimal height=0;
publicdecimal width=0;
publicdecimal length=0;
public System .Collections .ArrayList doors =new System .Collections .ArrayList ();
}
publicclassdoor
{
publicdecimal width;
publicdecimal height;
publicdecimal doorarea()
{
return (width *height );
}

کد بالا در کلاس تعریف شده و کد پایین در سطح فرم
room myroom = newroom();
myroom.length = 3;

myroom.width = 4;

myroom.height = 5;

door mydoor = newdoor();

mydoor.height = (decimal)1.5;

mydoor.width = 2;

myroom.doors.Add(mydoor);

مشکل من تو خط اخر.