' Visual Basic .NET Document Option Strict On ' Public Interface IFahrenheit Function GetTemperature() As Decimal End Interface Public Interface ICelsius Function GetTemperature() As Decimal End Interface Public Class Temperature : Implements ICelsius, IFahrenheit Private _value As Decimal Public Sub New(value As Decimal) ' We assume that this is the Celsius value. _value = value End Sub Public Function GetFahrenheit() As Decimal _ Implements IFahrenheit.GetTemperature Return _value * 9 / 5 + 32 End Function Public Function GetCelsius() As Decimal _ Implements ICelsius.GetTemperature Return _value End Function End Class Module Example Public Sub Main() Dim temp As New Temperature(100.0d) Console.WriteLine("Temperature in Celsius: {0} degrees", temp.GetCelsius()) Console.WriteLine("Temperature in Fahrenheit: {0} degrees", temp.GetFahrenheit()) End Sub End Module ' The example displays the following output: ' Temperature in Celsius: 100.0 degrees ' Temperature in Fahrenheit: 212.0 degrees '