実現したいこと
Visual studioのC#で作成したDLLをVSCODEのpythonから参照した時、
クラスのメソッドをインテリセンスで表示したい。
・WINDOWS10とVisual studio2019を使用
・vscode で pip install pythonnet
下記を作成して、VSCODEで正常に動きますが、スニペットを表示するように
したい。下記で"cal."としてインテリセンス候補でcal.add と表示したい
該当のソースコード
CSharpDLL.DLL visual
1using System; 2using System.Collections.Generic; 3using System.Linq; 4using System.Text; 5using System.Threading.Tasks; 6namespace CSharpDLL 7{ 8 public class Calculation 9 { 10 // intの足し算 11 public int Add(int a, int b) 12 { 13 return a + b; 14 } 15 } 16 17}
Csh.py
1 2import clr # Python.net 3clr.AddReference("CSharpDLL") 4import CSharpDLL as calc 5cal = calc.Calculation() 6ret = cal.Add(5, 2) 7print(ret, type(ret)) 8

回答1件
あなたの回答
tips
プレビュー