Mega Code Archive
Search
.Net
ASP .Net
ASP .Net Tutorial
C#
C# Book
C# by API
C# Tutorial
VB.Net
VB.Net by API
VB.Net Tutorial
Visual C++ .Net
VisualBasic Script
Java
Java
Java Book
Java by API
Java Tutorial
Script
Flash ActionScript
Flex
JavaScript DHTML
JavaScript Reference
JavaScript Tutorial
Database
MSSQL
MSSQL Tutorial
MySQL
MySQL Tutorial
Oracle PLSQL
Oracle PLSQL Tutorial
PostgreSQL
Languages
Android
C
C Tutorial
C++
C++ Tutorial
Delphi
Perl
PHP
Python
Python Tutorial
Ruby
Silverlight
Office
MSOfficeExcel 2007 Tutorial
MSOfficePowerPoint 2007 Tutorial
MSOfficeWord 2007 Tutorial
Data
XML
XML Tutorial
VB.Net
LINQ 160 codes
Home
VB.Net
LINQ
1 A select statement against object list
2 Add vbCrLf to the selected value
3 Aggregating Count with Conditional
4 All cars in reverse
5 All with Function
6 Alternative Syntax for First Operator
7 Alternative Syntax for FirstOrDefault Condition
8 Alternative Syntax for Grouped Max
9 Alternative syntax for Grouping All
10 Alternative Syntax for Max Grouping
11 Alternative Syntax for Sum
12 Alternative syntax for Take While
13 An anonymous type is returned containing the Id, Name and Pay
14 An indexed Where clause that returns digits whose name is shorter than their value
15 Anonymous Types in Select Clause
16 Any Example
17 Build a query expression using extension methods granted to the Array via the Enumerable type
18 Calls ToString() on each anonymous object
19 Check for the second letter from each word in an array
20 Check String start-with value
21 Combine Select and Where to get value from an array based on the value from another array
22 Compound Order By
23 Compound Order By (two conditions)
24 Compound Order By Ascending then Descending
25 Compound Select From (select from two arrays)
26 Convert Linq result to Array
27 Convert Linq result to List
28 Convert query to a list of string
29 Converting ToArray
30 Counts how many items are in your Favorites folder
31 Create a query expression
32 Create anonymous type from query
33 Create anonymous type in query and convert to array
34 Define the reverse order query
35 Determine if the two lists are equal
36 Determine which people have a non-empty Pet array
37 Distinct result
38 Distinct with Key
39 Distinct with Object and IEqualityComparer
40 Element Operators First
41 Element Operators FirstOrDefault
42 Equals vs = in query
43 Filter by name length
44 Filtering (Where)
45 Filtering Numbers
46 Find files created within the last year
47 Find the cars that are going less than 55 mph, and order by descending PetName
48 FirstOrDefault Condition
49 Func with user-defined function
50 Get all cars Similar to Select in SQL
51 Get all the elements from the first array except for the elements from the second array
52 Get count from the query
53 Get differences
54 Get only distinct makes
55 Get only the pet names
56 Get structured data which only accounts for the Make and Color of each item
57 Get the average salary
58 Get the count of all employees hired this year
59 Get the products from the both arrays excluding duplicates
60 Get the products from the first array that have duplicates in the second array
61 Get the top 5 memory-using applications currently loaded
62 Grouped Average
63 Grouped Max
64 Grouped Min
65 Grouping with Group By
66 Indexed Take While
67 Indexed Where
68 Join Person and Salaries lists to get the max and min salary
69 Join two object lists together
70 Lambda expression syntax
71 Lambda with No Args
72 Lambdas with Multiple Params
73 Let in query
74 LINQ query with Enumerable Lambdas
75 Linq Over Array
76 Linq Over int Array
77 Linq to query File System
78 Linq way of doing Object creation
79 Max and nested From clause
80 Min and let clause
81 Nested Group By
82 Num is called the range variable which will take turns representing each value in the array
83 Order all the cars by PetName
84 Order By Descending
85 Order by two properties
86 Projecting Select
87 Query Date with Linq
88 Query for String length
89 Query Reuse with deferred execution
90 Query String Array With Operators
91 Reflector Linq result
92 Renaming property in Select
93 Reverse Ordering
94 Select by a Property
95 Select by object id
96 Select with Function
97 Set Operators Except
98 Set Operators Intersect
99 Set Operators Union
100 Shows all keys under HKLMSoftware that start with the letter C
101 Shows all public methods in an assembly
102 Shows all public methods in an assembly, with duplicates removed
103 Shows shortcuts to everything under My Recent Documents
104 Single Example
105 Single Or Default Example
106 Sum with Linq
107 Take Partitioning
108 Take While Example
109 Transformation Select
110 Two order By clauses
111 Use a loop to print out each value in Linq query result
112 Use Lambda Function to wrap a query
113 Use SequenceEqual to compare two Arrays
114 Use SkipWhile to get all elements starting from first element less than its position
115 Uses Distinct to find the unique Category names
116 Uses reflection to show all System assemblies which are currently loaded
117 Using a compound From clause
118 Using a compound From clause to make a query that returns pairs
119 Using Aggregating Average to get the average length of the words in the array
120 Using Aggregating Average to get the average of all numbers in an array
121 Using Aggregating Count to get the number of unique factors of 300
122 Using Aggregating Max to get the highest number in an array
123 Using Aggregating Max to get the length of the longest word in an array
124 Using Aggregating Min to get the length of the shortest word in an array
125 Using Aggregating Min to get the lowest number in an array
126 Using Aggregating Sum to get the total number of characters of all words
127 Using Aggregating Sum to get the total of the numbers in an array
128 Using All to return a grouped a list of projectList
129 Using an indexed Select clause to determine if the value of Integers match their position
130 Using an indexed SelectMany clause
131 Using AndAlso in Where clause
132 Using Any to return a grouped a list of projectList only for categories
133 Using compound From clause to select all orders where total is less than 500 00
134 Using Concat to create one sequence
135 Using Concat to create one sequence that contains each arrays values
136 Using Count to return a list of categories and how many projectList each has
137 Using Count to return a list of employeeList and how many orders each has
138 Using First to return the first matching element
139 Using Func to do filter
140 Using Func to do filter 2
141 Using Group By to partition a list of projectList by category
142 Using Intersect to create one sequence that contains the common first letter
143 Using linq to query the Registry
144 Using Select New With to create new objects
145 Using Select to produce a sequence of each word in an array with new case
146 Using Select to produce a sequence of Integers one value higher
147 Using Select to produce a sequence of new objects from two arrays with calculation
148 Using Select to produce a sequence of strings from a sequence of Integers
149 Using Select to return a sequence of project names
150 Using SequenceEqual to see if two sequences match on all elements in the same order
151 Using Skip to get all but the first 2
152 Using Skip to get all but the first 4 elements of the array
153 Using Skip While to get elements divisible by 3
154 Using Sum to get the total units in stock for each project category
155 Using Take to get only the first 3 elements of the array
156 Using Take While to get elements starting from the beginning until a condition
157 Using Union to create one sequence that contains the unique first letter
158 Using where clause to check the first name of a Persion
159 Where Drilldown
160 Where with a function