c#
在VS中创建类库,根据自己需要起名,确定以后会生成一个叫Class1的类
public class Class1
{
public int AddShort(short x, short y)
{
return x + y;
} }
代码示例
python 代码调用
pip install pythonnet 安装CLR
python 项目目录
c#
在VS中创建类库,根据自己需要起名,确定以后会生成一个叫Class1的类
public class Class1
{
public int AddShort(short x, short y)
{
return x + y;
} }
代码示例
python 代码调用
pip install pythonnet 安装CLR
python 项目目录
为了记录自己的学习成果,防止遗忘,同时为了帮助在C#学习过程中遇到同样问题的同志们,所以将原版代码奉上!!!
C# PYTHON 互调
C# 调用 Python 有常见的四种方法,之所以选择这种,是因为相对简单,并且出错率低、适用范围广 熟悉Python开发的人ic void
C#中调用python脚本
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M