Good questions. Const and Readonly Property both prevent reassignment, but they have different lifetimes and uses.
A class or module Const is shared: there is one value rather than one per instance. Its initializer may be a runtime expression, including a method call. With reference types such as arrays, the reference cannot be replaced, but the referenced object can still be modified.
A Readonly Property is instance state by default, so every instance receives its own value. Its initialiser must be a compile-time-safe default, and the property cannot subsequently be assigned, even from a constructor. Shared Readonly Property provides one class-wide value instead.
For a value calculated by a method or constructor, use a get-only computed property, optionally backed by a private writable property:
Class Example
Private Property StoredValue As String
Constructor()
Self.StoredValue = MakeValue()
End Constructor
Property Value As String
Get
Return Self.StoredValue
End Get
End Property
End Class
Regarding the duplicate VALID_NATIVE_TYPES declarations: the Analyser is correct; there are now two physical declarations in the source. The next release will recognise and display them correctly, but it will not remove either automatically. You can either delete one manually now or wait for the update and delete one through the Inspector. The failure to navigate from Search is another consequence of the current Studio parser not recognising that generic constant declaration; that should also be resolved by the fix.