using namespace System;
using namespace System::Windows::Forms;
using namespace System::ComponentModel;
public ref class mgClass
{
public:
mgClass();
protected:
!mgClass();
public:
~mgClass();
[Description("This is the new top1m file")]//FileNameEditor
[Category("Global")]
//[EditorAttribute(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="Dundas.Charting.WebControl.Design.LegendItemCollectionEditor, DundasRSChart, Version=3.1.0.254, Culture=neutral, PublicKeyToken=11fb0f2e372fc326")]
[Editor((System::Windows::Forms::Design::FolderNameEditor::typeid), ( System::Drawing::Design::UITypeEditor::typeid))]
//[Editor(typeof(FileSelectorTypeEditor), typeof(UITypeEditor))]
property String^ FirstName
{
String ^ get ();
void set (String ^str);
}
property String^ LastName
{
String ^ get ();
void set (String ^str);
}
String^ JoinName();
private:
//PureCClass* m_pImpObj;
};
注意,如果要属性可以打开文件或者文件夹选择框,需要引用 System.Design.dll 然后在属性上面添加[Editor((System::Windows::Forms::Design::FolderNameEditor::typeid), ( System::Drawing::Design::UITypeEditor::typeid))]