【发布时间】:2021-12-20 22:57:12
【问题描述】:
我想设置一个带有图像的图片框,但有一个整数将它链接在一起。
资源中的图片命名为picture_1、picture_2、picture_3
这就是我想要做的,但是,我得到一个错误:
imageNumber = 1;
image_position[0, 1].Image = Properties.Resources.picture_ + imageNumber;
我正在尝试将图片框设置为 picture_1 但得到这个:
错误 CS0117“资源”不包含“图片_”的定义
【问题讨论】:
-
这里
image_position[0, 1].Image = Properties.Resources.picture_ + imageNumber有错吗?Properties.Resources.picture_包含什么?是字符串变量吗?
标签: c#