# Struct NpgsqlCidr

Namespace
  NpgsqlTypes

Assembly
  Npgsql.dll

Represents a PostgreSQL cidr type.

    [Obsolete("Use .NET IPNetwork instead of NpgsqlCidr to map to PostgreSQL cidr")]
    public readonly record struct NpgsqlCidr : IEquatable<NpgsqlCidr>

Implements
  IEquatable<NpgsqlCidr>

Inherited Members
  ValueType.Equals(object)
  ValueType.GetHashCode()
  object.Equals(object, object)
  object.GetType()
  object.ReferenceEquals(object, object)

## Remarks

https://www.postgresql.org/docs/current/static/datatype-net-types.html

## Constructors

### NpgsqlCidr(IPAddress, byte)

    public NpgsqlCidr(IPAddress address, byte netmask)

#### Parameters

`address` IPAddress
`netmask` byte

### NpgsqlCidr(string)

    public NpgsqlCidr(string addr)

#### Parameters

`addr` string

## Properties

### Address

    public IPAddress Address { get; }

#### Property Value

IPAddress

### Netmask

    public byte Netmask { get; }

#### Property Value

byte

## Methods

### Deconstruct(out IPAddress, out byte)

    public void Deconstruct(out IPAddress address, out byte netmask)

#### Parameters

`address` IPAddress
`netmask` byte

### ToString()

Returns the fully qualified type name of this instance.

    public override string ToString()

#### Returns

string

  The fully qualified type name.

## Operators

### explicit operator IPAddress(NpgsqlCidr)

    public static explicit operator IPAddress(NpgsqlCidr cidr)

#### Parameters

`cidr` NpgsqlCidr

#### Returns

IPAddress

### implicit operator NpgsqlInet(NpgsqlCidr)

    public static implicit operator NpgsqlInet(NpgsqlCidr cidr)

#### Parameters

`cidr` NpgsqlCidr

#### Returns

NpgsqlInet