为什么不编译此代码? [英] Why do not compile this code?
问题描述
来自MSDN
http://msdn.microsoft.com/en -us/library/system.windows.forms.design.filenameeditor(VS.80).aspx [
请帮我.
二手C ++/CLI,.NET 2.0,VS2008
________________________________________________________________________
如何检查DLL文件?
我更改了DLL文件,但是
此文件也失败了
更多问题〜
在MSDN的示例代码中
VB:GetType(System.Windows.Forms.Design.FileNameEditor)
C#:typeof(System.Windows.Forms.Design.FileNameEditor)
C ++:System :: ComponentModel :: Design :: CollectionEditor :: typeid
不使用同一类(vb,c#:FileNameEditor,c ++:CollectionEditor)
是吗?
________________________________________________________________________
谢谢!!我找到它了!
from MSDN
http://msdn.microsoft.com/en-us/library/system.windows.forms.design.filenameeditor(VS.80).aspx[^]
public:
[EditorAttribute(System::ComponentModel::Design::FileNameEditor::typeid,
System::Drawing::Design::UITypeEditor::typeid)]
property String^ testFilename
{
String^ get()
{
return filename;
}
void set( String^ value )
{
filename = value;
}
}
private:
String^ filename;
I want see openFileDialog when propertyGrid''s stringItem click event. :-)
but MSDN sample code is do not work.
compiler said "can not find FileNameEditor Class or NameSpace"
Plz help me.
used C++ / CLI, .NET 2.0, VS2008
________________________________________________________________________
how can I check DLL file?
I''m changed my DLL file But
this file failed too
More Question~
in MSDN''s sample code
VB : GetType(System.Windows.Forms.Design.FileNameEditor)
C# : typeof(System.Windows.Forms.Design.FileNameEditor)
C++: System::ComponentModel::Design::CollectionEditor::typeid
dose not used same class (vb, c#: FileNameEditor, c++: CollectionEditor)
Is it right??
________________________________________________________________________
Thank you!! I find it!!
推荐答案
最可能的原因是您没有在项目中包括正确的程序集就无法使用此东西.
程序集:System.Design(在system.design.dll中)"
Most likely reason is that you''ve not included the right assembly in your project for this stuff to be available.
"Assembly: System.Design (in system.design.dll) "
请编辑您的帖子,而不添加带有更多问题的答案".现在,我看不到或引用您的回复.
您将对该dll的引用添加到您的项目中.如果您不知道如何操作,则应考虑购买一本书并阅读.只需右键单击引用,选择添加引用",然后找到您需要的引用.
Please edit your post, not add an ''answer'' that''s more questions. I can''t see or quote your reply, now.
You add a reference to that dll to your project. If you don''t know how, you should consider buying a book and reading it. Just right click on references, choose ''add reference'' and find the one you need.
对不起<code><code><code><code>
这篇关于为什么不编译此代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!