我想使用方法获取所有按钮的backgroundimage的路径,但我似乎无法获取路径。这是我的代码如何获取c中按钮的BackgroundImage路径#
b1.BackgroundImage = Image.FromFile(C:\\Users\\m\\Documents\\Visual Studio
2010\\Projects\\PApp\\Papp\\1.jpg) ;
b2.BackgroundImage = Image.FromFile(C:\\Users\\m\\Documents\\Visual Studio 2010\\Projects\\PApp\\Papp\\2.jpg) ;
Console.WriteLine(b2.BackgroundImage);
Console.WriteLine(b1.BackgroundImage);
我可以显示在按钮图像,但我希望它显示在控制台的路径,但所有我得到的是System.Drawing.Bitmap。路径是静态的。