【发布时间】:2013-03-29 06:18:06
【问题描述】:
我在 C++/CLI 中使用 Winform,我有 pictureBox1,我正在尝试编译以下代码,但它失败了:
pictureBox1->Image->Dispose();
编译器告诉 Dispose is not a member of System::Drawing::Image 我尝试在 C# 中使用它并且它可以工作:
pictureBox1.Image.Dispose();
我使用 MS Visual Studio 2010。
【问题讨论】:
-
你试过
delete pictureBox1->Image; pictureBox1->Image = nullptr;
标签: c# .net visual-studio-2010 c++-cli