M
moondaddy
I want to create a public enum that can be used throughout a project. I
created an enum like this in a module:
Public Enum ParentType
Project = 0
Stage = 1
VIP = 2
Func = 3
Equipment = 4
Idea = 5
Tech = 6
End Enum
I have been able to declare private variables as ParentType and pass them as
parameters from method to method OK. Now I need to create a public property
in a class as ParentType like this:
Private miCurrentParentType As ParentType
Public Property CurrentParentType() As ParentType
Get
Return miCurrentParentType
End Get
Set(ByVal Value As ParentType)
miCurrentParentType = Value
End Set
End Property
I get a blue squiggly under ParentType in the line:
Public Property CurrentParentType() As ParentType
and the compile error is:
'CurrentParentType' cannot expose a Friend type outside of the Public class
'Tech_UIL'.
I often have similar problems where I have a public enum or structure and
want to declare variables as these types and pass or reference them around
the application.
Is there a way to do this? Also, eventually, the project will be broken
into smaller projects such as a business tier and data access tier and I
will want to have these types referenced as described above throughout the
entire solution across projects.
any recomendations?
Thanks.
created an enum like this in a module:
Public Enum ParentType
Project = 0
Stage = 1
VIP = 2
Func = 3
Equipment = 4
Idea = 5
Tech = 6
End Enum
I have been able to declare private variables as ParentType and pass them as
parameters from method to method OK. Now I need to create a public property
in a class as ParentType like this:
Private miCurrentParentType As ParentType
Public Property CurrentParentType() As ParentType
Get
Return miCurrentParentType
End Get
Set(ByVal Value As ParentType)
miCurrentParentType = Value
End Set
End Property
I get a blue squiggly under ParentType in the line:
Public Property CurrentParentType() As ParentType
and the compile error is:
'CurrentParentType' cannot expose a Friend type outside of the Public class
'Tech_UIL'.
I often have similar problems where I have a public enum or structure and
want to declare variables as these types and pass or reference them around
the application.
Is there a way to do this? Also, eventually, the project will be broken
into smaller projects such as a business tier and data access tier and I
will want to have these types referenced as described above throughout the
entire solution across projects.
any recomendations?
Thanks.