【发布时间】:2011-01-17 00:52:39
【问题描述】:
我正在尝试声明新的抽象类
using System;
using System.Drawing;
using System.Windows.Forms;
using Microsoft.Xna.Framework.Graphics;
abstract public class GraphicsDeviceControl : Control
{
//....
protected abstract void Update();
}
但是当我编译它时,我收到了这个警告:
'WinFormsContentLoading.GraphicsDeviceControl.Update()' 隐藏继承的成员 'System.Windows.Forms.Control.Update()'。 如果 hidden 是,则使用 new 关键字 有意的。
但我想使用 Microsoft.Xna 命名空间,而不是 System
【问题讨论】:
-
Microsft.Xna 命名空间中没有控件。目前尚不清楚您实际想要实现什么 - 您想要在 Windows 窗体控件中绘制 XNA 内容还是实现 Microsoft.Xna.Framework.Game/Microsoft.Xna.Framework .GameComponent 的更新。
标签: c# namespaces abstract xna-4.0