Android Question Public Property

Terradrones

Active Member
Licensed User
Hi All

Need help\hint again please.

This I have in VB.net:

B4X:
[/
        Public Property Longitude() As Coordinate
            Get
                Return cooLong
            End Get
            Set(value As Coordinate)
                If value.Direction = CardinalDirection.East OrElse value.Direction = CardinalDirection.West Then
                    cooLong = value
                    GetUTM()
                End If
            End Set
        End Property
]

How would I write this in B4A?

Thanks
Michael
 

LucaMs

Expert
Licensed User
Longtime User
B4X:
Type Coordinate(Direction As Int)
Private cooLong As Coordinate

Public Sub setLongitude(value As Coordinate)
    If value.Direction = CardinalDirection.East Or value.Direction = CardinalDirection.West Then
        cooLong = value
        GetUTM()
    End If
End Sub

Public Sub getLongitude
    Return cooLong
End Sub
 
Last edited:
Upvote 1
Top