Advertisement
richcoleman

Object Properties Alt

Nov 11th, 2011
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. Public Class Test
  3.  
  4.     Public Sub New()
  5.  
  6.         Dim doc As New Process.Document()
  7.         doc.SourceType = "URL"
  8.         doc.SourceData = "http://myOtherDomain/MyOtherPage.htm"
  9.  
  10.         Dim p As New Process()
  11.         p.Documents.Add(doc)
  12.  
  13.     End Sub
  14.  
  15. End Class
  16.  
  17.  
  18. Public Class Process
  19.  
  20.     Public Documents As New DocumentCollection()
  21.  
  22.     Public Class Document
  23.  
  24.         Private _sourceType As String = "URL"
  25.         Public Property SourceType() As String
  26.             Get
  27.                 Return _sourceType
  28.             End Get
  29.             Set(ByVal value As String)
  30.                 _sourceType = value
  31.             End Set
  32.         End Property
  33.  
  34.         Private _sourceData As String = "http://www.mydomain/Mypage.html"
  35.         Public Property SourceData() As String
  36.             Get
  37.                 Return _sourceData
  38.             End Get
  39.             Set(ByVal value As String)
  40.                 _sourceData = value
  41.             End Set
  42.         End Property
  43.  
  44.     End Class
  45.  
  46.     NotInheritable Class DocumentCollection
  47.         Inherits CollectionBase
  48.  
  49.         Public Sub Add(ByVal document As Document)
  50.             List.Add(document)
  51.         End Sub
  52.  
  53.     End Class
  54.  
  55. End Class
  56.  
  57.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement