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

The parameter for the Set property procedure has a different type from the property that it belongs to.

Error ID: BC31064

To correct this error

  • Change the data type of the parameter to Set so that it matches the data type for the property. For example:

    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
    

See Also

Tasks

How to: Add Fields and Properties to a Class

Concepts

Property Procedures

Properties and Property Procedures