MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

NET/Link Thread in C#

  • To: mathgroup at smc.vnet.net
  • Subject: [mg92578] NET/Link Thread in C#
  • From: Fabian <fabian.uriarte at gmail.com>
  • Date: Mon, 6 Oct 2008 04:14:46 -0400 (EDT)

Dear All-

Can anyone give me a hint on how to start C# threads from
Mathematica ?

I tried:
====
Needs["NETLink`"]
InstallNET[];

LoadNETType["System.Threading.Thread"]

myThread = NETNew[ThreadStart]

and I got:
=======
NETType["System.Threading.Thread", 8]
NETNew::args: Improper count or type of arguments. >>
$Failed

I also tried:
========
LoadNETType["System.Threading.Thread"]
t = NETNew[`Thread, Console`Out@WriteLine["Hello from .NET"] Start]

and I got:
======
NETType["System.Threading.Thread", 8]
NETNew::args: Improper count or type of arguments. >>
$Failed


I believe class ThreadStart needs to be instantiated before class
Thread, as the former is an argument of the latter's constructor.

Please help Thank you.


  • Prev by Date: Re: Comparison between Mathematica and other
  • Next by Date: Using an locator and Rotating 3D graphics
  • Previous by thread: Re: Axis in two scales
  • Next by thread: Using an locator and Rotating 3D graphics