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
 

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

Property. What is going on here? 1
Button event not firing 3
Control Property. 3
Property ... what am I doing wrong? 1
Which one is right? 4
Property 1
Property default value 1
Session Problems 2

Back
Top