vb Class syntax

Class Category
	'public properties - let (set)
		Public Property Let ID(p_ID)
			m_ID = CInt(p_ID)
		End Property

	'public properties - get (retrieve)
		Public Property Get ID()
			ID = m_ID
		End Property
		
	'private properties
		Private m_ID

	'public methods
		Public Sub Categories()
		    'do stuff
		End Sub
		
		Public Function GetPostCategories(intPostID)
		    'do stuff
		    
		    GetPostCategories = strReturn
		End Function

	'private methods
		Private Function FormatUrl(strUrl,strType)
			'do stuff

			'return
			FormatUrl = strUrl
		End Function
End Class
Syntax for creating a class, with both public/private properties and methods - as used on slickcms extensively.

Updated: Saturday 9th October 2010, 13:13pm

There are 0 comments

Leave a comment of your own

Comments are currently closed.