S
shapper
Hello,
I am getting a few values from a XML file using LINQ.
I need to convert two values to Boolean and to DateTime.
The DateTime string in the XML file was created simply using
DateTime.UtcNow.ToString().
I have:
IQueryable<Bag> bags = (from b in XElement.Load("../Data/
Bags.xml").Elements("Bags");
orderby b.Element
("Updated").Value descending
select new Bag {
Id = new Guid
(b.Element("Id").Value),
Content = b.Element
("Content").Value,
Created = b.Element
("Created").Value,
Name = b.Element
("Name").Value,
Open = b.Element
("Open").Value
}).AsQueryable();
I need to convert the values Created (DateTime) and Open (Boolean)
What is the best way to do this?
Thanks,
Miguel
I am getting a few values from a XML file using LINQ.
I need to convert two values to Boolean and to DateTime.
The DateTime string in the XML file was created simply using
DateTime.UtcNow.ToString().
I have:
IQueryable<Bag> bags = (from b in XElement.Load("../Data/
Bags.xml").Elements("Bags");
orderby b.Element
("Updated").Value descending
select new Bag {
Id = new Guid
(b.Element("Id").Value),
Content = b.Element
("Content").Value,
Created = b.Element
("Created").Value,
Name = b.Element
("Name").Value,
Open = b.Element
("Open").Value
}).AsQueryable();
I need to convert the values Created (DateTime) and Open (Boolean)
What is the best way to do this?
Thanks,
Miguel