BogaNet 1.4.0
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
BogaNet.Extension.ObjectExtension Class Reference

Extension methods for objects. More...

Static Public Member Functions

static byte[] BNToByteArray (this object obj)
 Converts an object to a byte-array (as JSON).
 
static T BNToObject< T > (this byte[] bytes)
 Converts a byte-array (as JSON) to an object.
 
static string BNToString (this object? obj)
 Adds a generic ToString-method to objects.
 

Detailed Description

Extension methods for objects.

Member Function Documentation

◆ BNToByteArray()

static byte[] BogaNet.Extension.ObjectExtension.BNToByteArray ( this object obj)
static

Converts an object to a byte-array (as JSON).

Parameters
objGiven object
Returns
Byte-array with the object
Exceptions
ArgumentNullException

◆ BNToObject< T >()

static T BogaNet.Extension.ObjectExtension.BNToObject< T > ( this byte[] bytes)
static

Converts a byte-array (as JSON) to an object.

Parameters
bytesByte-array
Returns
Object from the byte-array
Exceptions
ArgumentNullException

◆ BNToString()

static string BogaNet.Extension.ObjectExtension.BNToString ( this object? obj)
static

Adds a generic ToString-method to objects.

Parameters
objObject for the generic ToString
Returns
Generic ToString

The documentation for this class was generated from the following file: