Skip to content

ConfigDefinition Class

Section and key of a setting. Used as a unique key for identification within a ConfigFile. The same definition can be used in multiple config files, it will point to different settings then.

C#
public class ConfigDefinition : IEquatable<ConfigDefinition>

Inheritance object

Implements IEquatable<ConfigDefinition>

Create a new definition. Definitions with same section and key are equal.

C#
public ConfigDefinition(string section, string key)

section string
Group of the setting, case sensitive.

key string
Name of the setting, case sensitive.

C#
[Obsolete("description argument is no longer used, put it in a ConfigDescription instead")]
public ConfigDefinition(string section, string key, string description)

section string

key string

description string

Group of the setting. All settings within a config file are grouped by this.

C#
public string Section { get; }

Name of the setting.

C#
public string Key { get; }

Check if the definitions are the same.

C#
public bool Equals(ConfigDefinition other)

other ConfigDefinition
An object to compare with this object.

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

Check if the definitions are the same.

C#
public override bool Equals(object obj)

obj object

bool

Serves as the default hash function.

C#
public override int GetHashCode()

int
A hash code for the current object.

Returns a string that represents the current object.

C#
public override string ToString()

string
A string that represents the current object.