C# 클래스 Python.Runtime.PyInt

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

공개 메소드들

메소드 설명
AsInt ( PyObject value ) : PyInt

AsInt Method

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

IsIntType ( PyObject value ) : bool

IsIntType Method

Returns true if the given object is a Python int.

PyInt ( IntPtr ptr ) : System

PyInt Constructor

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

PyInt ( PyObject o ) : System

PyInt Constructor

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

PyInt ( byte value ) : System

PyInt Constructor

Creates a new Python int from a byte value.

PyInt ( int value ) : System

PyInt Constructor

Creates a new Python int from an int32 value.

PyInt ( long value ) : System

PyInt Constructor

Creates a new Python int from an int64 value.

PyInt ( short value ) : System

PyInt Constructor

Creates a new Python int from an int16 value.

PyInt ( string value ) : System

PyInt Constructor

Creates a new Python int from a string value.

ToInt16 ( ) : short

ToInt16 Method

Return the value of the Python int object as an int16.

ToInt32 ( ) : int

ToInt32 Method

Return the value of the Python int object as an int32.

ToInt64 ( ) : long

ToInt64 Method

Return the value of the Python int object as an int64.

비공개 메소드들

메소드 설명
PyInt ( sbyte value ) : System
PyInt ( uint value ) : System
PyInt ( ulong value ) : System
PyInt ( ushort value ) : System

메소드 상세

AsInt() 공개 정적인 메소드

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

IsIntType() 공개 정적인 메소드

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

PyInt() 공개 메소드

PyInt Constructor
Creates a new PyInt 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 PyInt ( IntPtr ptr ) : System
ptr System.IntPtr
리턴 System

PyInt() 공개 메소드

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

PyInt() 공개 메소드

PyInt Constructor
Creates a new Python int from a byte value.
public PyInt ( byte value ) : System
value byte
리턴 System

PyInt() 공개 메소드

PyInt Constructor
Creates a new Python int from an int32 value.
public PyInt ( int value ) : System
value int
리턴 System

PyInt() 공개 메소드

PyInt Constructor
Creates a new Python int from an int64 value.
public PyInt ( long value ) : System
value long
리턴 System

PyInt() 공개 메소드

PyInt Constructor
Creates a new Python int from an int16 value.
public PyInt ( short value ) : System
value short
리턴 System

PyInt() 공개 메소드

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

ToInt16() 공개 메소드

ToInt16 Method
Return the value of the Python int object as an int16.
public ToInt16 ( ) : short
리턴 short

ToInt32() 공개 메소드

ToInt32 Method
Return the value of the Python int object as an int32.
public ToInt32 ( ) : int
리턴 int

ToInt64() 공개 메소드

ToInt64 Method
Return the value of the Python int object as an int64.
public ToInt64 ( ) : long
리턴 long