C# Класс Python.Runtime.PyLong

Represents a Python long int object. See the documentation at http://www.python.org/doc/current/api/longObjects.html
Наследование: PyNumber
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AsLong ( PyObject value ) : PyLong

AsLong Method

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

IsLongType ( PyObject value ) : bool

IsLongType Method

Returns true if the given object is a Python long.

PyLong ( IntPtr ptr ) : System

PyLong Constructor

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

PyLong ( PyObject o ) : System

PyLong Constructor

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

PyLong ( byte value ) : System

PyLong Constructor

Creates a new PyLong from a byte value.

PyLong ( double value ) : System

PyLong Constructor

Creates a new PyLong from an double value.

PyLong ( int value ) : System

PyLong Constructor

Creates a new PyLong from an int32 value.

PyLong ( long value ) : System

PyLong Constructor

Creates a new PyLong from an int64 value.

PyLong ( short value ) : System

PyLong Constructor

Creates a new PyLong from an int16 value.

PyLong ( string value ) : System

PyLong Constructor

Creates a new PyLong from a string value.

Приватные методы

Метод Описание
PyLong ( sbyte value ) : System
PyLong ( uint value ) : System
PyLong ( ulong value ) : System
PyLong ( ushort value ) : System

Описание методов

AsLong() публичный статический Метод

AsLong Method
Convert a Python object to a Python long if possible, raising a PythonException if the conversion is not possible. This is equivalent to the Python expression "long(object)".
public static AsLong ( PyObject value ) : PyLong
value PyObject
Результат PyLong

IsLongType() публичный статический Метод

IsLongType Method
Returns true if the given object is a Python long.
public static IsLongType ( PyObject value ) : bool
value PyObject
Результат bool

PyLong() публичный Метод

PyLong Constructor
Creates a new PyLong 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 PyLong ( IntPtr ptr ) : System
ptr System.IntPtr
Результат System

PyLong() публичный Метод

PyLong Constructor
Copy constructor - obtain a PyLong from a generic PyObject. An ArgumentException will be thrown if the given object is not a Python long object.
public PyLong ( PyObject o ) : System
o PyObject
Результат System

PyLong() публичный Метод

PyLong Constructor
Creates a new PyLong from a byte value.
public PyLong ( byte value ) : System
value byte
Результат System

PyLong() публичный Метод

PyLong Constructor
Creates a new PyLong from an double value.
public PyLong ( double value ) : System
value double
Результат System

PyLong() публичный Метод

PyLong Constructor
Creates a new PyLong from an int32 value.
public PyLong ( int value ) : System
value int
Результат System

PyLong() публичный Метод

PyLong Constructor
Creates a new PyLong from an int64 value.
public PyLong ( long value ) : System
value long
Результат System

PyLong() публичный Метод

PyLong Constructor
Creates a new PyLong from an int16 value.
public PyLong ( short value ) : System
value short
Результат System

PyLong() публичный Метод

PyLong Constructor
Creates a new PyLong from a string value.
public PyLong ( string value ) : System
value string
Результат System