Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Property

Reply
Thread Tools

Property

 
 
shapper
Guest
Posts: n/a
 
      10-04-2007
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

 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      10-04-2007
On Oct 4, 5:20 pm, shapper <mdmo...@gmail.com> wrote:
> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Binding to property of property of object collection TS ASP .Net 3 08-31-2006 12:57 PM
TableCell: BackColor Property But No BackGround Property? Nathan Sokalski ASP .Net 1 04-29-2006 10:09 PM
DataBinder.Eval for an object's property property... like Eval(Container.DataItem,"Version.Major") Eric Newton ASP .Net 3 04-04-2005 10:11 PM
Set CSS property equal to another CSS property? Noozer HTML 10 10-13-2004 09:20 PM
Is there a way to set the a CSS property to be explicitly the same as another CSS property? Joshua Beall HTML 1 12-10-2003 07:21 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57