Il parametro 'Set' deve essere dello stesso tipo della proprietà che lo contiene

Aggiornamento: novembre 2007

'Set' parameter must have the same type as the containing property

Il tipo del parametro per la routine della proprietà Set è diverso da quello della proprietà a cui appartiene.

ID errore: BC31064

Per correggere l'errore

  • Cambiare il tipo di dati del parametro in Set così che corrisponda a quello della proprietà, Di seguito è riportato un esempio:

    Class Class1
       ' Declare a local variable to hold the property value.
       Private Fval As Integer
    
       Property F() As Integer
          Get
             Return Fval
          End Get
          Set(ByVal Value As Integer)
             Fval = Value
          End Set
       End Property
    End Class
    

Vedere anche

Attività

Procedura: aggiungere campi e proprietà a una classe

Concetti

Routine Property

Proprietà e routine delle proprietà