-->
A sorting operation orders the elements of a sequence based on one or more attributes. The first sort criterion performs a primary sort on the elements. By specifying a second sort criterion, you can sort the elements within each primary sort group.
However, what I'm looking for is a function (or class) written in C# or VB.NET to return a poker hand (e.g. 'Two Pair - 3s and Jacks' or 'Four Aces') from a set of cards. I've attached the VB.NET code for my structures and enums, but I can easily convert from another result format. Code to Solve Texas Holdem Poker Hand. Teemuuu 11-Aug-09 9:50. Teemuuu: 11-Aug-09 9:50. Visual Developer - Visual Basic 2006, 2007, 2008 But no longer in 2009.
The following illustration shows the results of an alphabetical sort operation on a sequence of characters. Geant casino st tropez opening times.
The standard query operator methods that sort data are listed in the following section.
Methods
Method Name | Description | Visual Basic Query Expression Syntax | More Information |
---|---|---|---|
OrderBy | Sorts values in ascending order. | Order By | Enumerable.OrderBy Queryable.OrderBy |
OrderByDescending | Sorts values in descending order. | Order By … Descending | Enumerable.OrderByDescending Queryable.OrderByDescending |
ThenBy | Performs a secondary sort in ascending order. | Order By …, … | Enumerable.ThenBy Queryable.ThenBy |
ThenByDescending | Performs a secondary sort in descending order. | Order By …, … Descending | Enumerable.ThenByDescending Queryable.ThenByDescending |
Reverse | Reverses the order of the elements in a collection. | Not applicable. | Enumerable.Reverse Queryable.Reverse |
Query Expression Syntax Examples
Primary Sort Examples
Primary Ascending Sort
The following example demonstrates how to use the Order By
clause in a LINQ query to sort the strings in an array by string length, in ascending order. Hialeah casino address.
Primary Descending Sort
The next example demonstrates how to use the Order By Descending
clause in a LINQ query to sort the strings by their first letter, in descending order.
Secondary Sort Examples
Secondary Ascending Sort
Basic Poker Hands
The following example demonstrates how to use the Order By
clause in a LINQ query to perform a primary and secondary sort of the strings in an array. The strings are sorted primarily by length and secondarily by the first letter of the string, both in ascending order.
Secondary Descending Sort
The next example demonstrates how to use the Order By Descending
clause in a LINQ query to perform a primary sort, in ascending order, and a secondary sort, in descending order. The strings are sorted primarily by length and secondarily by the first letter of the string.