' Visual Basic 2008 9.0 .NET Examples - Constructors - Object Oriented Programming : Class Product Private m_Price As Decimal Private ReadOnly m_TaxPercentage As Decimal Public Sub New(ByVal taxPercentage As Decimal) m_TaxPercentage = taxPercentage End Sub Public ReadOnly Property TaxPercentage() As Decimal Get TaxPercentage = m_TaxPercentage End Get End Property Public Property Price() As Decimal Get Price = m_Price End Get Set(ByVal value As Decimal) m_Price = value End Set End Property Public Function GetPriceIncludingTax() As Decimal GetPriceIncludingTax = Price * (1 + (TaxPercentage / 100)) End Function End Class Module Client5 Sub Main() Dim product1 As Product = New Product(10) product1.Price = 100 Console.WriteLine(product1.GetPriceIncludingTax()) ' Console.ReadLine() End Sub End Module ' Visit www.studyvb.com for more examples. Copyright 2003-2008 De Wolf.