问题
I think this is a simple question to answer, but I still can't figure out a way to get past it.
Basically, what I wanted, was to use a Bitmap
object in my Xna game. So I went ahead and added System.Drawing
as an assembly reference. This worked out perfectly, except that I now get a different error; "'Color' is an ambiguous reference between 'Microsoft.Xna.Framework.Color' and 'System.Drawing'. How do I get past this?
回答1:
The assembly reference alone doesn't lead to the error. It's the using
that you've probably inserted, because it imports the whole namespace. You could try
using Bitmap = System.Drawing.Bitmap
instead to import the bitmap only.
来源:https://stackoverflow.com/questions/16998143/ambiguous-reference-between-microsoft-xna-framework-color-system-drawing