Property

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

Hello,

I have a property of type string:

' RegEx
Private _RegEx As String
Public Property RegEx() As String
Get
Return _RegEx
End Get
Set(ByVal value As String)
_RegEx = value
End Set
End Property ' RegEx

I want the property to have the value ".*" if it wasn't defined.

How can I do this?

Thanks,
Miguel
 
Hello,

I have a property of type string:

' RegEx
Private _RegEx As String
Public Property RegEx() As String
Get
Return _RegEx
End Get
Set(ByVal value As String)
_RegEx = value
End Set
End Property ' RegEx

I want the property to have the value ".*" if it wasn't defined.

How can I do this?

Thanks,
Miguel

Get
If IsNothing(_RegEx) Then
_RegEx = ".*"
End If
Return _RegEx
 
Back
Top