Link to home
Start Free TrialLog in
Avatar of ayha1999
ayha1999

asked on

Conversion

HI,

How can I convert attached python script to c#?

Please help.

Thanks
mesure-volume.py
Avatar of Monica P
Monica P
Flag of India image

Avatar of ayha1999
ayha1999

ASKER

I need python to c#
Avatar of Rikin Shah
You can try to compile your python app using IronPython (http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython) to .NET, this should be possible without or just minor changes. This way you can make use of all the .NET features from python.

Then you can decompile your IronPython assembly with an .NET decompiler like Lutz Roeders Reflector (http://www.red-gate.com/products/reflector) which can decompile whole Assemblies into Visual Studio projects. This way you can convert from ANY .NET Langauge into one of the supported languages of this program.
ASKER CERTIFIED SOLUTION
Avatar of Meir Rivkin
Meir Rivkin
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi sedgwick,

there is compilation error at

 return File.Exists(_filename);      <----- error at File


  public double CalculateVolume()
    {
        //read binary file
        _fileBytes = File.ReadAllBytes(_filename);     <----- error at File

ayha
Add: using System.IO
How can I run the code in page_load or form load event by providing the STL file to calculate the volume?

I can't upload the sample file, here is the link.

http://orion.math.iastate.edu/burkardt/data/stl/bottle.stl

Thanks
I will open another question for that.

Thnaks for your support.
No problem. Post link here to new question