PC Review


Reply
Thread Tools Rate Thread

Declaring Enums

 
 
Terry Holland
Guest
Posts: n/a
 
      12th Nov 2004
I have a an assembly with the following code


Module modEnums
Public Enum enuFixType
ftyButtSide 'jamb full height, header inside jambs
ftyButtTop 'header full width, jambs butt up to header
ftyMorticeSide 'tenons at each end of header
ftyMorticeTop 'tenons at end of jambs
End Enum
End Module

Public Class clsSubFrame

Public Property FixType() As enuFixType
Get
Return m_ftyFixType
End Get
Set(ByVal Value As enuFixType)
m_ftyFixType = Value
End Set
End Property

.......

End Class

This won't build because I get the following error.
C:\_Development\Door Schedule\Door Schedule VB\BO\clsSubFrame.vb(26):
'FixType' cannot expose a Friend type outside of the Public class
'clsSubFrame'.

I want enuFixType availabe to all of my application. Could someone tell me
how/where to declare it to avoid this error.

tia

Terry Holland


 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      12th Nov 2004
"Terry Holland" <(E-Mail Removed)> schrieb:
>I have a an assembly with the following code
>
>
> Module modEnums
> Public Enum enuFixType
> ftyButtSide 'jamb full height, header inside jambs
> ftyButtTop 'header full width, jambs butt up to header
> ftyMorticeSide 'tenons at each end of header
> ftyMorticeTop 'tenons at end of jambs
> End Enum
> End Module
>
> Public Class clsSubFrame
>
> Public Property FixType() As enuFixType
> Get
> Return m_ftyFixType
> End Get
> Set(ByVal Value As enuFixType)
> m_ftyFixType = Value
> End Set
> End Property
>
> ......
>
> End Class
>
> This won't build because I get the following error.
> C:\_Development\Door Schedule\Door Schedule VB\BO\clsSubFrame.vb(26):
> 'FixType' cannot expose a Friend type outside of the Public class
> 'clsSubFrame'.


The module 'modEnums' is implicitly 'Friend', not 'Public'. Eiter add the
'Public' access modifier or declare the enum outside the module (the latter
is the preferred way).

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enums and Arrays of Enums J055 Microsoft C# .NET 3 12th Sep 2006 11:31 PM
Enums Nikolay Petrov Microsoft VB .NET 5 13th Mar 2005 07:49 PM
Enums =?Utf-8?B?Wg==?= Microsoft C# .NET 3 15th Feb 2005 02:12 AM
"global" enums vs. enums in class? Harold Hsu Microsoft VB .NET 1 21st Oct 2004 07:40 PM
enums martin Microsoft ASP .NET 2 28th May 2004 05:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:34 PM.