You create a Web Part. The Web Part contains a grid view named GridView1 and the following
code segment. (Line numbers are included for reference only.) 01 IntranetDataContext dc = new
IntranetDataContext(“http://intranet”); 02 MyGridView.DataSource = from announce In
dc.Announcements _ ; 03 04 Select announce IntranetDataContext is a LINQ context. You need
to ensure that GridView1 only displays items from Announcements that have an expiry date that is
greater than or equal to the current date. What should you do?
A.
Change line 04 to the following code segment: Select Not announce.Expires.HasValue
B.
Change line 04 to the following code segment: Select
announce.Expires.Value.CompareTo(DateTime.Now) >= 0
C.
Add the following line of code at line 03: Where
announce.Expires.Value.CompareTo(DateTime.Now) >= 0 _
D.
Add the following line of code at line 03: Order By
announce.Expires.Value.CompareTo(DateTime.Now) >= 0 _