Table of Contents

Class BluetoothAddress

Namespace
TechnologySolutions.Rfid.AsciiProtocol.Extensions
Assembly
TechnologySolutions.Rfid.AsciiProtocol.Core.dll

Represents the MAC address of the Bluetooth device

public sealed class BluetoothAddress
Inheritance
BluetoothAddress
Inherited Members

Constructors

BluetoothAddress(ulong)

Initializes a new instance of the BluetoothAddress class

public BluetoothAddress(ulong macAddress)

Parameters

macAddress ulong

The MAC address should be the 6 least significant bytes of the value

Properties

MacAddress

Gets the MAC address or the device

public ulong MacAddress { get; }

Property Value

ulong

Methods

Parse(string)

Attempt to parse a BluetoothAddress from a string as a sequence of 12 hex digits with or without colon separators

public static BluetoothAddress Parse(string value)

Parameters

value string

The Bluetooth MAC address is 6 hex bytes 00:11:22:33:44:55 or 001122334455

Returns

BluetoothAddress

The parsed Bluetooth MAC address

Exceptions

FormatException

If the value cannot be parsed

ToString()

Returns a string representation of this object

public override string ToString()

Returns

string

A string representation of the object

TryParse(string, out BluetoothAddress)

Attempt to parse a BluetoothAddress from a string as a sequence of 12 hex digits with or without colon separators

public static bool TryParse(string value, out BluetoothAddress result)

Parameters

value string

The value to parse

result BluetoothAddress

The parsed value if successful

Returns

bool

True if the value could be parsed to a Bluetooth MAC address, false otherwise