C# Class Python.Runtime.PyLong

Represents a Python long int object. See the documentation at http://www.python.org/doc/current/api/longObjects.html
Inheritance: PyNumber
Afficher le fichier Open project: fkarb/pythonnet Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
PyLong ( sbyte value ) : System
PyLong ( uint value ) : System
PyLong ( ulong value ) : System
PyLong ( ushort value ) : System

Method Details

AsLong() public static méthode

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
Résultat PyLong

IsLongType() public static méthode

IsLongType Method
Returns true if the given object is a Python long.
public static IsLongType ( PyObject value ) : bool
value PyObject
Résultat bool

PyLong() public méthode

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
Résultat System

PyLong() public méthode

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
Résultat System

PyLong() public méthode

PyLong Constructor
Creates a new PyLong from a byte value.
public PyLong ( byte value ) : System
value byte
Résultat System

PyLong() public méthode

PyLong Constructor
Creates a new PyLong from an double value.
public PyLong ( double value ) : System
value double
Résultat System

PyLong() public méthode

PyLong Constructor
Creates a new PyLong from an int32 value.
public PyLong ( int value ) : System
value int
Résultat System

PyLong() public méthode

PyLong Constructor
Creates a new PyLong from an int64 value.
public PyLong ( long value ) : System
value long
Résultat System

PyLong() public méthode

PyLong Constructor
Creates a new PyLong from an int16 value.
public PyLong ( short value ) : System
value short
Résultat System

PyLong() public méthode

PyLong Constructor
Creates a new PyLong from a string value.
public PyLong ( string value ) : System
value string
Résultat System