Assume the following class declaration: Public Property ID as String Public Prop
ID: 3679467 • Letter: A
Question
Assume the following class declaration:
Public Property ID as String
Public Property Name as String
Public Property Balance as Double
Public Property CreationDate as DateTime
Public Property BalanceHistory as List (of Double)
Assume that the following List contains a set of Account Objects:
Dim accountList as New List (of Account)
A. Write a LINQ statement that lists the accounts in ascending order by ID.
B. Write a LINQ statement that lists accounts created before 1/1/2005
C. Write a LINQ statement that returns only the Name and Balance of the items in accoutList
D. Write a LINQ statement that obtain the BalanceHistory of the account whose ID equals “10021” Assign BalanceHistory property to a List variable.
Explanation / Answer
LINQ statement that lists the accounts in ascending order by ID var ascendingQuery = from data in dataList orderby data.Property ascending select data;
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.