In an XML that I am parsing, I have the following:
<event>
<book>Felicity Fly</book>
<author>Christina Gabbitas</author>
<bookImgUrl>http://www.whsmith.co.uk/Images/Products\957\255\9780957255203_t_f.jpg</bookImgUrl>
<info>Christina Gabbitas will be signing copies of her new book, Felicity Fly. Books should be bought from WHSmith. Proof of purchase may be necessary</info>
<date>20 Apr 2013</date>
<startTime>10:30</startTime>
<location>
<name>WHSmith Chester</name>
<address>5-7 Foregate Street</address>
<city>Chester</city>
<county>Cheshire</county>
<postcode>CH1 1HH</postcode>
<tel>01244 321106</tel>
</location>
</event>
I want to create a DateTime object from the two nodes <date>
and <startTime>
. So I am doing this:
var EventEntity = new Event()
{
Book = e.Book,
BookImgUrl = e.BookImgUrl,
Info = e.Info,
Start = new DateTime().**?**
};
But When I press the dot [.] after the DateTime object, I am not getting the Parse method from Intellisense, why is this? What am I doing wrong?
I was planning on using the solution outlined in this post.