Re: return a private enum
- From: "Andy" <ajj3085@xxxxxxxxxxxx>
- Date: 23 Jun 2006 13:36:34 -0700
I don't think that will compile. The reason is that your return type
is of type Status, but you're not letting the outside world know how
Status is defined.
You'll have to make the enum public.
HTH
Andy
Valmont wrote:
Complete newbie at C#.
Class below stripped for brevity.
How do I return a private "Status" from a public method?
I may need a set/get but I don't know how to do that on an enum.
Thank you.
public class SomeClass
{
private enum Status {OK , NOK, UNK};
public Status check_status()
{
//...code to determine Status...
return NOK;
}
}
.
- References:
- return a private enum
- From: Valmont
- return a private enum
- Prev by Date: Re: Non-Sequential Binary Reads
- Next by Date: Re: Help With Nesting Classes In Library
- Previous by thread: Re: return a private enum
- Next by thread: Re: return a private enum
- Index(es):
Relevant Pages
|