reckfellENGINE

Reckfell.Collections.Dictionary<TKey, TValue>

Typed wrapper around Reckfell's Dictionary class, a dictionary of TKey and TValue annotated, Variant typed elements allocated in the engine in C++. Useful when interfacing with the engine. Otherwise prefer .NET collections such as System.Co

On this page
class Reckfell.Collections.Dictionary<TKey, TValue>ReckfellSharp

Typed wrapper around Reckfell's Dictionary class, a dictionary of TKey and TValue annotated, Variant typed elements allocated in the engine in C++. Useful when interfacing with the engine. Otherwise prefer .NET collections such as System.Collections.Generic.Dictionary2`.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors3

Dictionary3 overloads
# Dictionary · 1/3
C#
public Dictionary();

Constructs a new empty Reckfell.Collections.Dictionary<TKey, TValue>.

# Dictionary · 2/3
C#
public Dictionary(Reckfell.Collections.Dictionary dictionary);

Constructs a new Reckfell.Collections.Dictionary<TKey, TValue> from the given dictionary's elements.

Parameters
NameTypeDefault
dictionaryReckfell.Collections.Dictionary—
dictionary

The dictionary to construct from.

# Dictionary · 3/3
C#
public Dictionary(System.Collections.Generic.IDictionary<TKey, TValue> dictionary);

Constructs a new Reckfell.Collections.Dictionary<TKey, TValue> from the given dictionary's elements.

Parameters
NameTypeDefault
dictionarySystem.Collections.Generic.IDictionary<TKey, TValue>—
dictionary

The dictionary to construct from.

Properties5

CountProperty
# Count
C#
public int Count { get; }

Returns the number of elements in this Reckfell.Collections.Dictionary<TKey, TValue>. This is also known as the size or length of the dictionary.

IsReadOnlyProperty
# IsReadOnly
C#
public bool IsReadOnly { get; }

Returns true if the dictionary is read-only. See Reckfell.Collections.Dictionary<TKey, TValue>.MakeReadOnly.

ItemProperty
# Item
C#
public TValue? this[TKey? key] { get; set; }

Returns the value at the given key.

KeysProperty
# Keys
C#
public System.Collections.Generic.ICollection<TKey> Keys { get; }

Gets the collection of keys in this Reckfell.Collections.Dictionary<TKey, TValue>.

ValuesProperty
# Values
C#
public System.Collections.Generic.ICollection<TValue> Values { get; }

Gets the collection of elements in this Reckfell.Collections.Dictionary<TKey, TValue>.

Methods14

Addvoid
# Add
C#
public void Add(TKey? key, TValue? value);

Adds an object Range.Value at key key to this Reckfell.Collections.Dictionary<TKey, TValue>.

Parameters
NameTypeDefault
keyTKey—
valueTValue—
key

The key at which to add the object.

value

The object to add.

Clearvoid
# Clear
C#
public void Clear();

Clears the dictionary, removing all entries from it.

ContainsKeybool
# ContainsKey
C#
public bool ContainsKey(TKey? key);

Checks if this Reckfell.Collections.Dictionary<TKey, TValue> contains the given key.

Parameters
NameTypeDefault
keyTKey—
key

The key to look for.

Returns bool

Whether or not this dictionary contains the given key.

DuplicateReckfell.Collections.Dictionary<TKey, TValue>
# Duplicate
C#
public Reckfell.Collections.Dictionary<TKey, TValue> Duplicate(bool deep = false);

Returns a copy of the Reckfell.Collections.Dictionary<TKey, TValue>. If deep is true, a deep copy is performed: all nested arrays and dictionaries are duplicated and will not be shared with the original dictionary. If false, a shallow copy is made and references to the original nested arrays and dictionaries are kept, so that modifying a sub-array or dictionary in the copy will also impact those referenced in the source dictionary. Note that any ReckfellObject derived elements will be shallow copied regardless of the deep setting.

Parameters
NameTypeDefault
deepboolfalse
deep

If true, performs a deep copy.

Returns Reckfell.Collections.Dictionary<TKey, TValue>

A new Reckfell Dictionary.

GetEnumeratorSystem.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey, TValue>>
# GetEnumerator
C#
public System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey, TValue>> GetEnumerator();

Gets an enumerator for this Reckfell.Collections.Dictionary<TKey, TValue>.

Returns System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<TKey, TValue>>

An enumerator.

MakeReadOnlyvoid
# MakeReadOnly
C#
public void MakeReadOnly();

Makes the Reckfell.Collections.Dictionary<TKey, TValue> read-only, i.e. disabled modying of the dictionary's elements. Does not apply to nested content, e.g. content of nested dictionaries.

Mergevoid
# Merge
C#
public void Merge(Reckfell.Collections.Dictionary<TKey, TValue> dictionary, bool overwrite = false);
Parameters
NameTypeDefault
dictionaryReckfell.Collections.Dictionary<TKey, TValue>—
overwriteboolfalse
RecursiveEqualbool
# RecursiveEqual
C#
public bool RecursiveEqual(Reckfell.Collections.Dictionary<TKey, TValue> other);
Parameters
NameTypeDefault
otherReckfell.Collections.Dictionary<TKey, TValue>—
Returns bool
Removebool
# Remove
C#
public bool Remove(TKey? key);

Removes an element from this Reckfell.Collections.Dictionary<TKey, TValue> by key.

Parameters
NameTypeDefault
keyTKey—
key

The key of the element to remove.

Returns bool
ToStringstring
# ToString
C#
public override string ToString();

Converts this Reckfell.Collections.Dictionary<TKey, TValue> to a string.

Returns string

A string representation of this dictionary.

TryGetValuebool
# TryGetValue
C#
public bool TryGetValue(TKey? key, out TValue? value);

Gets the value for the given key in the dictionary. Returns true if an entry for the given key exists in the dictionary; otherwise, returns false.

Parameters
NameTypeDefault
keyTKey—
valueTValue—
key

The key of the element to get.

value

The value at the given key.

Returns bool

If an entry was found for the given key.

op_Explicit2 overloads
# op_Explicit · 1/2
C#
public static explicit operator Reckfell.Collections.Dictionary(Reckfell.Collections.Dictionary<TKey, TValue>? from);
Parameters
NameTypeDefault
fromReckfell.Collections.Dictionary<TKey, TValue>—
Returns Reckfell.Collections.Dictionary
# op_Explicit · 2/2
C#
public static explicit operator Reckfell.Collections.Dictionary<TKey, TValue>(Variant from);
Parameters
NameTypeDefault
fromVariant—
Returns Reckfell.Collections.Dictionary<TKey, TValue>
op_ImplicitVariant
# op_Implicit
C#
public static implicit operator Variant(Reckfell.Collections.Dictionary<TKey, TValue> from);
Parameters
NameTypeDefault
fromReckfell.Collections.Dictionary<TKey, TValue>—
Returns Variant
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.