Creating a new EditorAttribute?


I'm having trouble creating an EditorAttribute to be used on a PropertyDescriptor. Basically I'm creating a dynamic class from an xml file for editing values via a property grid. Everything is working fine, and I'm able to add other attributes I need, but I run into a wall trying to add an EditorAttribute.

This line of code: new EditorAttribute(GetType(FolderNameEditor),GetType(UITypeEditor));

Is giving me a 'class name not valid at this point' for both 'FolderNameEditor' and 'UITypeEditor'.

Any thoughts? I can provide more code if necessary,

Who is Participating?
ozymandiasConnect With a Mentor Commented:
How about :

new EditorAttribute(typeof(FolderNameEditor),typeof(UITypeEditor));

WillyCornbreadAuthor Commented:
lol, Thanks.

I swear I tried that to no avail, but that is the ticket. Thanks for the quick response, some easy point for you...

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.