Re: Making Definitions



Devon-S <DevonS@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Just declare the enum outside any other type.

Thanks, I do appreciate the help. This nearly has it for me, but I don't see
how I use the declaration in other assemblies then. I know I should go back
and read a c# manual, but most of the time I get it (at least somewhat).

Well, I'd certainly recommend learning C# "properly" rather just taking
a sort of "hit and hope" approach. It may work for a while, but sooner
or later you're bound to run up against problems due to a lack of
knowledge of the theory behind it all.

The ImageDisplaySize is used in a WebControl and in the top of the file that
declares the web control, I put

public enum ImageDisplaySize { Small, Medium, Large }

I would expect to be able to use it where I had dragged the WebUC onto the
page. But it doesnt appear when I go to set the property type.

I am sure this is very easy on the "Easy Button" scale. Appreciate
the help.

When you saying you're trying to set the property type, do you mean
you're trying to set the property *value* in the designer, or you're
trying to set the property *type* in the web control class itself?

If you're in code, but in a different class, do you have the
appropriate "using" directive for the namespace containing the enum?

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
.