C# 클래스 Python.Runtime.PyFloat

Represents a Python float object. See the documentation at http://www.python.org/doc/current/api/floatObjects.html
상속: PyNumber
파일 보기 프로젝트 열기: fkarb/pythonnet 1 사용 예제들

공개 메소드들

메소드 설명
AsFloat ( PyObject value ) : PyFloat

AsFloat Method

Convert a Python object to a Python float if possible, raising a PythonException if the conversion is not possible. This is equivalent to the Python expression "float(object)".

IsFloatType ( PyObject value ) : bool

IsFloatType Method

Returns true if the given object is a Python float.

PyFloat ( IntPtr ptr ) : System

PyFloat Constructor

Creates a new PyFloat from an existing object reference. Note that the instance assumes ownership of the object reference. The object reference is not checked for type-correctness.

PyFloat ( PyObject o ) : System

PyFloat Constructor

Copy constructor - obtain a PyFloat from a generic PyObject. An ArgumentException will be thrown if the given object is not a Python float object.

PyFloat ( double value ) : System

PyFloat Constructor

Creates a new Python float from a double value.

PyFloat ( string value ) : System

PyFloat Constructor

Creates a new Python float from a string value.

메소드 상세

AsFloat() 공개 정적인 메소드

AsFloat Method
Convert a Python object to a Python float if possible, raising a PythonException if the conversion is not possible. This is equivalent to the Python expression "float(object)".
public static AsFloat ( PyObject value ) : PyFloat
value PyObject
리턴 PyFloat

IsFloatType() 공개 정적인 메소드

IsFloatType Method
Returns true if the given object is a Python float.
public static IsFloatType ( PyObject value ) : bool
value PyObject
리턴 bool

PyFloat() 공개 메소드

PyFloat Constructor
Creates a new PyFloat from an existing object reference. Note that the instance assumes ownership of the object reference. The object reference is not checked for type-correctness.
public PyFloat ( IntPtr ptr ) : System
ptr System.IntPtr
리턴 System

PyFloat() 공개 메소드

PyFloat Constructor
Copy constructor - obtain a PyFloat from a generic PyObject. An ArgumentException will be thrown if the given object is not a Python float object.
public PyFloat ( PyObject o ) : System
o PyObject
리턴 System

PyFloat() 공개 메소드

PyFloat Constructor
Creates a new Python float from a double value.
public PyFloat ( double value ) : System
value double
리턴 System

PyFloat() 공개 메소드

PyFloat Constructor
Creates a new Python float from a string value.
public PyFloat ( string value ) : System
value string
리턴 System