I have a huge xml file from which the key and value attributes are selected among other things.
How does C# handle the instantiation of literal strings? does it make a new object with allocating heap memory on every iteration or just once?Code:foreach ( XmlNode node in configProductCode.SelectNodes("/configuration/appSettings/add")) { ConfigProductCode cpc = new ConfigProductCode(); XmlAttribute keyAttr = node.Attributes["key"]; XmlAttribute valAttr = node.Attributes["value"]; // etc }