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 Dim dc As 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
announce.Expires.Value.CompareTo(DateTime.Now) >= 0
B.
Add the following line of code at line 03. Where
announce.Expires.Value.CompareTo(DateTime.Now) >= 0 _
C.
Change line 04 to the following code segment. Select Not announce.Expires.HasValue
D.
Add the following line of code at line 03. Order By
announce.Expires.Value.CompareTo(DateTime.Now) >= 0 _