Retrives a specifc Sofu.Value from this Map indentified by key.
Parameters
- key (String)
- Identifies the Value to get
Return Value
The Value at key
Examples
CopyC#
Sofu.Sofu.Map file = SofuReader.LoadFile("file.sofu"); try { Console.WriteLine(file.value("Title").ToString()); } catch (SofuNoElementException e) { Console.Out.WriteLine("--- INSERT TITLE HERE ---"); } catch (SofuNotValueException e) { Console.Out.WriteLine("Can't generate title, value expected!"); }
Exceptions
Exception | Condition |
---|---|
SofuNoElementException | Will throw SofuNoElementException when the Key is not in this Map |
SofuNotValueException | Throws a SofuNotValueException if the requested element is not a Value |