If let's say I have the following classes:
Public Class Vehicle
Sub New()
Car = New Car()
VehicleName = String.Empty
End Sub
Public Property Car As Car
<Mask()>
Public Property VehicleName As String
End Class
Public Class MaskAttribute
Inherits Attribute
Public Property Masking As String
End Class
<Serializable()>
Public Class Car
Sub New()
CarName = String.Empty
End Sub
<Mask()>
Public Property CarName As String
End Class
In the above sample codes, there is a custom attribute name Mask.
Given, there is an object Dim v As new Vehicle()
How to get all the properties of that object which have Mask custom attributes?
So in this case, the expected looping through it are Properties: CarName, and VehicleName as they both have mask attribute
I understand if I use reflection the performance would be slower rather than using lambda expression. Please correct me if I am wrong.
Any idea to achieve that objective using lambda expression?
Thanks!