类型转换
C#
if obj is Type obj_1Python
if isinstance(obj, Type):
ref, out 传参 (pythonnet)
C#
double s = 0.0;
part.GetReportProperty(property_name, ref s);
bool b = part.GetReportProperty(property_name, ref s);Python
s = 0.0
b, s = part.GetReportProperty(property_name, s)
传入C#数组作为参数 (pythonnet)
Python
t = Array.CreateInstance(Type,1)
t[0] = type(TSD.StraightDimension())
doEnum = sds.GetObjects(t)
C#
DrawingObjectEnumerator doEnum = sds.GetObjects(new Type[] { typeof(TSD.StraightDimension) });