By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,450 Members | 1,001 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,450 IT Pros & Developers. It's quick & easy.

Declaring Enums

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Terry Holland" <th******@sgbgb.co.uk> 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/>

Nov 21 '05 #2

P: n/a
"Terry Holland" <th******@sgbgb.co.uk> 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/>

Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.