Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

public enumeration names interfer with private member names

Status
Not open for further replies.

hwkranger

MIS
Nov 6, 2002
717
US
Today I found something interesting. As to how I missed it in the past, I am not sure. But the following creates a conflict. If someone can tell me why -- It would be beneficial.

Code:
Public Enum RecoveryTypeID
  rUnallocable = 1
  rUnRecovered
  rResearchReq 
  rRecovered 
End Enum

conflicts with (CONTAINED IN A CLASS MODULE: clsTicket)
Code:
Public Property Let RecoveryTypeID(mlngRecoveryTypeID As Long)
    adtbiztbDailyOtherTickets_DATA.mlngRecoveryTypeID = mlngRecoveryTypeID
End Property
Public Property Get RecoveryTypeID() As Long
    RecoveryTypeID = adtbiztbDailyOtherTickets_DATA.mlngRecoveryTypeID
End Property

What I don't understand, is why an enumerated values (which is a datatype of constants) has a naming conflict with a member of a class.

(If I make the member private, it no longer conflicts with the enumerated data type -- but I still don't see how myclass.recoverytypeid is related to the enumerated constant 'reoverytypeid')

Randall Vollen
National City Bank Corp.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top