积极答复者
有相同的类名,如何引用

问题
答案
-
你好,
你可以使用命名空间别名来解决这个问题。
global::System.Drawing.Bitmap
或者using drawing = System.Drawing;
drawing::Bitmap
更多内容请参考这篇文档。
Min Zhu [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 Min ZhuModerator 2011年8月16日 3:40
全部回复
-
项目中有个类System,我如何在此项目中引用系统的System类,如System.Drawing
如果类名相同,你必须写明命名空间,通过不同命名空间区分不同的类。比如你的系统类的命名空间是A,那么必须使用A.System。
另外,建议你应该引入系统类库中System.Drawing,然后写Drawing即可。
如果你有其它意见或私下交流,请直接发送maledong_work@foxmail.com;或者
If you do not have QQ, please open the page and download it and click the image to talk or leave message for me.
下载MSDN桌面工具(Vista,Win7)
下载Technet桌面小工具(Vista,Win7)
慈善点击,点击此处- 已编辑 ThankfulHeartModerator 2011年8月8日 1:54
-
你好,
你可以使用命名空间别名来解决这个问题。
global::System.Drawing.Bitmap
或者using drawing = System.Drawing;
drawing::Bitmap
更多内容请参考这篇文档。
Min Zhu [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 Min ZhuModerator 2011年8月16日 3:40