我是 C# 新手。然而,这似乎是一个微不足道的问题,但我找不到答案。
我试图简单地返回一个 Bitmap 对象(通过接口(interface)定义),但它无法“找到”Bitmap 类。我已经导入了适当的命名空间 System.Drawing;
但我仍然遇到相同的错误,
找不到类型或命名空间引用(是否缺少程序集引用?)
这是目前的代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;
namespace ConsoleApplication1
{
public interface PlanetInterface
{
bool isColonized();
bool isDestroyed();
Bitmap getImage(); //Why does Bitmap not 'exist'.
}
}
非常感谢任何帮助。谢谢。
最佳答案
关于c# - 位图无法返回?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52974066/