note 23580 added to function.dotnet-load

From: Date: Tue, 23 Jul 2002 07:54:37 +0000
Subject: note 23580 added to function.dotnet-load
Groups: php.notes 
Request: Send a blank email to php-notes+get-33405@lists.php.net to get a copy of this message
To realise functions within Microsoft.NET which can use with every type of parameter as boolean, integer, string or any other type you want to use do the following. Write your function in .NET : CSharp Example : MyFunction (params object[] parameters) { if (parameters[0].GetType().ToString() == "System.Int32") return "Parameter 0 is an Integer"; return "Parameter 0 is no Integer"; } Within PHP do the following : $parameter[0] = 12345; $parameter[1] = "My String"; $parameter[2] = false; $obj = new COM ("NameSpace.Class"); $value = $obj -> MyFunction($parameter) print($value); How to work with params and object you could read within the .NET Documentation. If you have any further question dont be afraid and write me... Bye Thomas -- http://www.php.net/manual/en/function.dotnet-load.php http://master.php.net/manage/user-notes.php?action=edit+23580 http://master.php.net/manage/user-notes.php?action=delete+23580 http://master.php.net/manage/user-notes.php?action=reject+23580

« previous php.notes (#33405) next »