Functions.MParamCount 方法 |
命名空间: XSharp.RT
FUNCTION MParamCount( symClass AS STRING, symMethod AS STRING ) AS DWORD
public static uint MParamCount( string symClass, string symMethod )
1CLASS Rectangle 2METHOD Area(x, y) CLASS Rectangle 3RETURN x*y 4CLASS Geometry 5METHOD IdentifyObject(symObject, symMethod); 6 CLASS Geometry 7RETURN MParamCount(symObject, symMethod) 8Function Start() 9 LOCAL oShapes AS OBJECT 10 ? MParamCount(#Rectangle, #Area) // 2 11 oShapes := Geometry{} 12 ? "这是一个 "+NTrim(oShapes:IdentifyObject; 13 (#Rectangle, #Area))+ " 维的对象" 14 // 它是一个 2 维的对象 15 RETURN TRUE