Dr.Bob's Euro42 converter using ASP.NET.
<%@ WebService Language="Delphi" Class="eBob42.Euro42" %>
unit eBob42;
interface
uses
System.Web.Services;
type
//[WebService(NameSpace='http://www.eBob42.com')]
Euro42 = class(WebService)
public
[WebMethod]
function About: String;
[WebMethod]
function GuldenToEuro(Gulden: double): double;
[WebMethod]
function EuroToGulden(Euro: double): double;
end;
implementation
function Euro42.About: String;
begin
Result := 'Dr.Bob''s Euro42 Web Service written in Delphi for .NET (preview)'
end;
const
GuldenPerEuro = 2.20371;
function Euro42.GuldenToEuro(Gulden: double): double;
begin
Result := Gulden / GuldenPerEuro
end;
function Euro42.EuroToGulden(Euro: double): double;
begin
Result := Euro * GuldenPerEuro
end;
end.