Loose the new keyword? The source you posted looks like vb to me? Try to find some c# source and translate that with babelcode ( http://lingua.codegear.com/babelcode...belClient.aspx ). You cannot trust it always but 90% it provides correct delphi code.