Table of Contents

Constructor Metadata

Namespace
LMKit.Data
Assembly
LM-Kit.NET.dll

Metadata(string, string)

Initializes a new instance of the Metadata class with the specified key and value.

public Metadata(string key, string value)

Parameters

key string

The key that identifies this metadata entry. It must not be null or empty.

value string

The value associated with the key. It must not be null. An empty string is allowed.

Examples

// Create a new metadata entry.
var metadata = new Metadata("Author", "John Doe");

// Output the key and value.
Console.WriteLine(metadata.Key);   // Output: Author
Console.WriteLine(metadata.Value); // Output: John Doe

Exceptions

ArgumentNullException

Thrown if value is null.

ArgumentException

Thrown if key is null or empty.