on
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

on (C# Reference)

Updated: July 2008

The on contextual keyword is used in the join clause of a query expression to specify the join condition.

The following example shows the use of on in a join clause.

var innerJoinQuery =
    from category in categories
    join prod in products on category.ID equals prod.CategoryID
    select new { ProductName = prod.Name, Category = category.Name }; 

Date

History

Reason

July 2008

Added topic.

Information enhancement.

Show:
© 2016 Microsoft