Answer the question
In order to leave comments, you need to log in
XDocument.Load(path) (xml linq) - optimization, where is the best place in the project to create this object?
I apologize for the possible incorrectness, I do not understand linq well.
What is the best way to use XDocument (xml linq) assuming the db file gets big?
Make it common in the class and use it later in methods?
public class XmlController
{
private string dbPath = @"DB.xml";
XDocument xDoc;
public bool load()
{
try
{
xDoc = XDocument.Load(dbPath);
}
...........
public bool addPack(string name)
{
try
{
XDocument xDoc = XDocument.Load(dbPath);
........
Answer the question
In order to leave comments, you need to log in
... if we assume that the database file will become large?
Big is how much do you think?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question