Sofu Documentation
SetAttribute Method (key, element)
NamespacesSofu.SofuMapSetAttribute(String, SofuObject)
Inserts a new element into the Map. Any other element with the same key is replaced
Declaration Syntax
C#
public void SetAttribute(
	string key,
	SofuObject element
)
Parameters
key (String)
Key to identify the element
element (SofuObject)
The element to insert
Examples
CopyC#
Sofu.Sofu.Map mymap = new Sofu.Sofu.Map();
mymap.SetAttribute("1",new Sofu.Sofu.Value("One"));
mymap.SetAttribute("2",new Sofu.Sofu.Value("Two"));
mymap.SetAttribute("3",new Sofu.Sofu.Value("Three"));
int key = Console.ReadKey();
if (mymap.HasAttribute(key.ToString())) {
    Console.WriteLine(mymap.value(key.ToString()).ToString());
}

Assembly: Sofu (Module: Sofu) Version: 0.2.1.0 (0.2.1.0)