FixWins.com
  • Csharp
  • Contact Us









0 Coding examples: IEnumerable LINQ Csharp code examples
  • sum of values via Aggregate
  • sum of squares of values via Aggregate
  • product of values via Aggregate
  • Select Collection or Array Elements
  • Remove Duplicate Items from an Array or Collection
  • Concatenate Data Sources
  • Aggregate Data Sources
  • Create Custom LINQ Extension Methods
  • Convert from IEnumerable<>
  • Pass array as IEnumerable parameter
  • Finding the first even number in the numbers list
  • Finding the first word that begins with 't' or 'T'
  • Finding the first item in the array
  • Finding the first word with more than 4 chars
  • Finding the first word that contains the character 'r'
  • Finding all numbers greater than 4
  • Finding the last word in the list with a length > 4
  • Finding whether the list contains a word with the letter 'r' in it
  • Is the predicate true for all words in the list
  • Listing the squares of all the numbers
  • Listing numbers 1 greater than each number in the list
  • Writing out the words in a lambda with a block and a variable definition
  • Writing out a fun ending to each word
  • Writing queries with methods rather than keywords
  • Computing nine factorial with LINQ
  • Checks whether an enumeration contains at least a certain number of items.
  • This method splits the into sequence of pieces size of each is not more then max length
  • Print elements in format 'element, element, element, ...'
  • Print elements in format 'x,y,z; x,y,z; ...'
  • Finds the numerical value that equals or is the next lowest value
  • Perform a specified action on every element of an collection.
  • Convert IEnumerable from one type to another generic type
  • Exists in IEnumerable by Predicate
  • For Each in IEnumerable by Action
  • True value in IEnumerable For All by Predicate
  • Creates an enumerable that iterates the range from Inclusive to Exclusive
  • Find Index in IEnumerable by Predicate
  • Is IEnumerator or IEnumerable Empty
  • Dimensions Of Jagged IEnumerable
  • Jagged 2D Image Enumerable
  • Return the closest value in IEnumerable
  • Get Random from IEnumerable
  • Grabs a subset of an IEnumerable based on a starting index and position
  • Is First in IEnumerable
  • double version of Enumerable.Range
  • Get Random value from IEnumerable
  • Get Random Selection from IEnumerable
  • Get Random Sub Selection from IEnumerable
  • Are IEnumerable Equal
  • Return true if the given enumerables have the same contents
  • Convert IEnumerable To Hex String
  • Builds a string representation for IEnumerable
  • Return a random element in the provided IEnumerable.
  • Get Random Item from IEnumerable
  • Apply Action on Each Element of an IEnumerable
  • Is IEnumerable Empty
  • Do Join on IEnumerable and return a string
  • Random value from IEnumerable
  • Get Hash Code for IEnumerable
  • IEnumerable To Observable Collection
  • Check if IEnumerable Contains by condition
  • Invoke the given action for each element in IEnumerable values.
  • Enqueue for IEnumerable
  • Adds each item in IEnumerable to ICollection.
  • Is IEnumerable Null Or Empty
  • IEnumerable As Typed List
  • Shuffle IEnumerable
  • Dynamically converts an IEnumerable to a generic list based on the given type.
  • Cast IEnumerable To Array
  • Cast IEnumerable To List
  • IEnumerable First Or Default
  • Clone IEnumerable and return List
  • Clone IEnumerable
  • Traverse Intersect IEnumerable
  • Copy IEnumerable to List
  • Join IEnumerable To String by Format
  • Split IEnumerable In Groups
  • Split IEnumerable In Groups Removing Duplicates
  • Performs "pagination" of a sequence IEnumerable, returning a fragment ("page") of its contents.
  • Random Element from IEnumerable
  • Find All element in IEnumerable
  • Get Element from IEnumerable
  • Random Shuffle IEnumerable
  • Create List from IEnumerable
  • Find Element from IEnumerable by Predicate
  • Find All Element from IEnumerable by Predicate
  • Get Element from IEnumerable by Index
  • Get Element Or Default from IEnumerable by index
  • Get Length of IEnumerable
  • Reverse IEnumerable
  • Get DataTable from IEnumerable
  • Stable Sort IEnumerable
  • Copy IEnumerable to ICollection
  • Get Range from IEnumerable
  • To Array by index on IEnumerable
  • Try Get from IEnumerable by Predicate
  • Indexes Of element in IEnumerable
  • Nullable First element from IEnumerable
  • Start New Partition by function on IEnumerable
  • Get the first item from an IEnumerable
  • Get the last item from an IEnumerable
  • Count IEnumerable Items
  • IEnumerable To String
  • Cast Valid IEnumerable
  • Index Of IEnumerable
  • Select from IEnumerable by function
  • IEnumerable To Covariant
  • Tests whether an IEnumerator is "empty", leaving IEnumerator at same position
  • Cast Valid element from IEnumerable
  • Calculates the intersection set of two IEnumerable
  • Checks if this enumeration has the given IEnumerable, applying the given to compare the equality of the elements.
  • Calculates the union set of IEnumerable and returns it.
  • Adds the specified object to the specified IEnumerable.
  • Determines whether the IEnumerable contains the specified Object.
  • Returns the first element contained in both source IEnumerable and target IEnumerable
  • Returns the first element in the target IEnumerable, or null if the collection is empty.
  • Items Equal between two IEnumerable
  • Add one element to IEnumerable
  • Get Duplicates from IEnumerable
  • Max Element in IEnumerable
  • Min Element from IEnumerable
  • Rotate element from IEnumerable
  • Get IEnumerable by page count
  • Equal between two IEnumerable
  • Minus one IEnumerable from IEnumerable
  • Select IEnumerable with function
  • Join IEnumerable With Comma
  • Returns the maximum value or null if sequence is empty.
  • Returns the minimum value or null if sequence is empty.
  • Helper method which turns a single item into an enumerable.
  • Performs the specified on each element of the enumerable.
  • ForEach extension that enumerates over all items in an and executes an action.
  • For each extension that enumerates over an enumerator and attempts to execute the provided action delegate and if the action throws an exception, continues executing.
  • Joins the enumerators.
  • Order By Random
  • Shuffle elements in random order. To get a random on the order used Random class.
  • Shuffle elements in very good random order.
  • Determines if the two given sequences contain the same items, not counting duplicates.
  • Determines if all items from the second given sequence are present in the first given sequence.
  • Iterates through a sequence, calling a delegate for each element in it.
  • Picks up random element from a specified sequence and returns it.
  • Executes a function on each item in a and returns the results in a new .
  • Contains Value with IEqualityComparer<T>
  • Compares two sequences by comparing their items instead of their references. Also checks the case that both sequences are null. In this case the method returns true.
  • Produces a sequence of items using a seed value and iteration method.
  • Generates a sequence of integral numbers within a specified range.
  • Returns the first zero based item of an item inside a sequence.
  • The predicate returns false to stop the iteration.
  • a better way to cast unknown IEnumerable to typed list
  • Contains Duplicates in IEnumerable
  • Dump IEnumerable byte
  • Searches IEnumerable for the max or default element.
  • Searches IEnumerable for the min or default element.
  • Hex Dump IEnumerable of byte
  • Long Sum IEnumerable
  • Paged IEnumerable
  • Add one element to the sequence
  • Returns all the elements but the last
  • Returns the slice of the collection between elements start and end
  • Returns all the elements but the first
  • Finds the first element in the collection that satisfies the predicate
  • Finds all the elements that match the predicate and then applies the functor
  • Creates a delimited string out of an IEnumerable list of T

Coding examples

0 Custom Type LINQ
  • access level
  • Anonymous Types
  • AppDomain
  • as
  • Assembly
  • Attribute
  • Box Unbox
  • class
  • Constant
  • Constructor
  • delegate
  • dynamic type
  • Enum
  • Event
  • Exception
  • Extension Methods
  • Field
  • Finalizer
  • Generics
  • Indexer
  • Inheritance
  • Inner Type
  • interface
  • is
  • Lambda
  • Local Method
  • Method
  • Method Parameter
  • nameof
  • namespace
  • Object Initializer
  • Operator Overloading
  • overload
  • Partial
  • Polymorphism
  • Property
  • read only
  • static
  • struct
  • this
  • try catch finally
0 Data Structure Algorithm LINQ
  • Factorial
  • Search
  • Stack
  • Tree
0 Database LINQ
  • Connection
  • LINQ Query
  • ODBC
  • SQL Command
0 File IO LINQ
  • Binary File
  • Directory
  • File
  • File Command
  • FileStream
  • GZip
  • Path
  • Permission
  • Serialization
  • String Reader Writer
0 Language Basics LINQ
  • Array
  • boolean
  • char
  • Console
  • continue
  • Data Type Cast
  • Data Type Format
  • Date Time
  • decimal
  • default
  • do while
  • double
  • Float
  • for
  • for each
  • goto
  • if
  • int
  • Null Operator
  • Nullable
  • Number
  • Operator
  • Preprocessor
  • Random
  • ref
  • Regex
  • string
  • StringBuilder
  • switch
  • Tuple
  • Variable
  • while
0 LINQ LINQ
  • Group By
  • IEnumerable
  • Projection
  • Query Array
  • Select
  • where
0 Network LINQ
  • IP Address
  • Network Interface
  • URL
  • Web
0 Operating System LINQ
  • Diagnostics
  • Environment
  • Process
  • Windows
0 Reflection LINQ
  • Attribute
  • Member
0 Security LINQ
  • Hash
  • MD5
  • Password
0 System LINQ
  • Array Compare
  • Array Convert
  • Array Create
  • Array Dimension
  • Array Element
  • Array Element Add
  • Array Enumerate
  • Array Equal
  • Array Find
  • Array Index
  • Array Null Element
  • Array Operation
  • Array Search
  • Array Shift
  • Array Shuffle
  • Array Slice
  • Array Sort
  • Array Split
  • Array String
  • Attribute
  • Bit
  • Boolean
  • Byte
  • Byte Array
  • Char
  • Char Unicode
  • Converter
  • DateTime Calculate
  • DateTime Compare
  • DateTime Convert
  • DateTime Day
  • DateTime Diff
  • DateTime Format
  • DateTime Hour
  • DateTime Local
  • DateTime Minute
  • DateTime Month
  • DateTime Parse
  • DateTime Quarter
  • DateTime Second
  • DateTime Time
  • DateTime Timestamp
  • DateTime Timezone
  • DateTime Unix
  • DateTime UTC
  • DateTime Week
  • DateTime Year
  • DateTimeOffset
  • Decimal
  • Double
  • Enum
  • Exception
  • Hash
  • Hex
  • IComparable
  • Int32
  • Int64
  • Math Convert
  • Math Easing Function
  • Math Geometry
  • Math Number
  • Math Statistics
  • Math Vector
  • Nullable
  • Object
  • Random
  • String Algorithm
  • String ASCII
  • String Base
  • String Base32
  • String Base64
  • String Case
  • String Contain
  • String Convert
  • String Encode Decode
  • String Endian
  • String Escape
  • String Format
  • String HTML
  • String Join
  • String Match
  • String New Line
  • String Number
  • String Padding
  • String Parse
  • String Quote
  • String Repeat
  • String Replace
  • String Reverse
  • String Search
  • String Shorten
  • String Split
  • String Start End
  • String Strip
  • String SubString
  • TimeSpan
  • Tuple
  • Type
0 System.Collections LINQ
  • ICollection
  • IDictionary
  • IEnumerable
0 System.Collections.Generic LINQ
  • ICollection
  • IDictionary
  • IEnumerable
  • IList
  • ISet
  • List
0 System.Data LINQ
  • DataTable
0 System.Drawing LINQ
  • Color
  • Color Brightness
  • Color Calculation
  • Color Convert
  • Color HSV
  • Color RGB
  • Graphics
  • Image Convert
  • Image Effect
  • Image Operation
  • Image Size
  • JPEG
0 System.Drawing.Imaging LINQ
  • Bitmap
0 System.Globalization LINQ
  • Chinese
  • English
0 System.IO LINQ
  • BinaryWriter
  • CSV File
  • DirectoryInfo
  • File Copy
  • File Name
  • File Path
  • File Size
  • File Time
  • FileStream
  • Hex
  • MemoryStream
  • Stream
  • StreamWriter
0 System.Net LINQ
  • IP Address
0 System.Reflection LINQ
  • Attribute
  • Constructor
  • ConstructorInfo
  • Enum
  • FieldInfo
  • Interface
  • Member
  • MethodInfo
  • Modifier
  • PropertyInfo
0 System.Security.Cryptography LINQ
  • ASN
  • Certificate
  • CRC
  • DES
  • Encrypt Decrypt
  • Hash
  • HMACMD5
  • MD5
  • Password
  • SHA1
0 System.Text.RegularExpressions LINQ
  • Match Number
  • Match String
0 System.Windows.Forms LINQ
  • Dialog
0 System.Windows.Media.Imaging LINQ
  • BitmapSource
0 System.Xml LINQ
  • XML Attribute
  • XML Child
  • XML DataSet
  • XML Document
  • XML Element
  • XML File
  • XML Format
  • XML Namespace
  • XML Node
  • XML Reader
  • XML Schema
  • XML Serialization
  • XML String
  • XML Writer
0 Thread Asynchronous LINQ
  • Mutex
  • Parallel
  • Producer Consumer
  • Synchronize
0 XML LINQ
  • XML Document
  • XML LINQ
  • XML Serialization