Table of Contents

Class VariantType

Namespace
GLib
Assembly
GLib-2.0.dll
public sealed class VariantType : IDisposable, BoxedRecord, IEquatable<VariantType>
Inheritance
VariantType
Implements
Inherited Members

Constructors

VariantType(VariantTypeOwnedHandle)

public VariantType(VariantTypeOwnedHandle handle)

Parameters

handle VariantTypeOwnedHandle

Fields

String

public static readonly VariantType String

Field Value

VariantType

Variant

public static readonly VariantType Variant

Field Value

VariantType

Properties

Handle

public VariantTypeOwnedHandle Handle { get; }

Property Value

VariantTypeOwnedHandle

Methods

Checked(string)

public static VariantType Checked(string typeString)

Parameters

typeString string

Returns

VariantType

Copy()

public VariantType Copy()

Returns

VariantType

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

DupString()

public string DupString()

Returns

string

Element()

public VariantType Element()

Returns

VariantType

Equal(VariantType)

public bool Equal(VariantType type2)

Parameters

type2 VariantType

Returns

bool

Equals(VariantType?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(VariantType? other)

Parameters

other VariantType

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

First()

public VariantType First()

Returns

VariantType

Free()

public void Free()

GetGType()

public static Type GetGType()

Returns

Type

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

GetStringLength()

public nuint GetStringLength()

Returns

nuint

Hash()

public uint Hash()

Returns

uint

IsArray()

public bool IsArray()

Returns

bool

IsBasic()

public bool IsBasic()

Returns

bool

IsContainer()

public bool IsContainer()

Returns

bool

IsDefinite()

public bool IsDefinite()

Returns

bool

IsDictEntry()

public bool IsDictEntry()

Returns

bool

IsMaybe()

public bool IsMaybe()

Returns

bool

IsSubtypeOf(VariantType)

public bool IsSubtypeOf(VariantType supertype)

Parameters

supertype VariantType

Returns

bool

IsTuple()

public bool IsTuple()

Returns

bool

IsVariant()

public bool IsVariant()

Returns

bool

Key()

public VariantType Key()

Returns

VariantType

NItems()

public nuint NItems()

Returns

nuint

New(string)

[Version("2.24")]
public static VariantType New(string typeString)

Parameters

typeString string

Returns

VariantType

NewArray(VariantType)

public static VariantType NewArray(VariantType element)

Parameters

element VariantType

Returns

VariantType

NewDictEntry(VariantType, VariantType)

public static VariantType NewDictEntry(VariantType key, VariantType value)

Parameters

key VariantType
value VariantType

Returns

VariantType

NewMaybe(VariantType)

public static VariantType NewMaybe(VariantType element)

Parameters

element VariantType

Returns

VariantType

NewTuple(VariantType[])

public static VariantType NewTuple(VariantType[] items)

Parameters

items VariantType[]

Returns

VariantType

Next()

public VariantType Next()

Returns

VariantType

PeekString()

public string PeekString()

Returns

string

StringGetDepth(string)

public static nuint StringGetDepth(string typeString)

Parameters

typeString string

Returns

nuint

StringIsValid(string)

public static bool StringIsValid(string typeString)

Parameters

typeString string

Returns

bool

StringScan(string, string?, out string)

[Version("2.24")]
public static bool StringScan(string @string, string? limit, out string endptr)

Parameters

string string
limit string
endptr string

Returns

bool

Value()

public VariantType Value()

Returns

VariantType