Property

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,058
Latest member
QQXCharlot

Latest Threads

Top