function rectanglewidth height thiswidth = width; thisheight = height; var rect = new rectangle10 20;consolelogrectwidth;里面中的new rectangle是什么意思
在这段代码中,new rectangle(10, 20) 表示创建一个名为 rectangle 的对象,并将它的 width 属性设置为 10,height 属性设置为 20。这样,rect 变量将引用这个新创建的对象。
原文地址: https://www.cveoy.top/t/topic/hUBc 著作权归作者所有。请勿转载和采集!