LINQ - Sample Queries

This project contains about 101 samples using LINQ.

 
 
 
 
 
4.8 Star
(89)
175,642 times
Add to favorites
3/13/2012
E-mail Twitter del.icio.us Digg Facebook

Solution explorer

VB.NET
C#
<?xml version="1.0" encoding="utf-8"?>
<root>
  <!-- 
    Microsoft ResX Schema 
    
    Version 2.0
    
    The primary goals of this format is to allow a simple XML format 
    that is mostly human readable. The generation and parsing of the 
    various data types are done through the TypeConverter classes 
    associated with the data types.
    
    Example:
    
    ... ado.net/XML headers & schema ...
    <resheader name="resmimetype">text/microsoft-resx</resheader>
    <resheader name="version">2.0</resheader>
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
        <value>[base64 mime encoded serialized .NET Framework object]</value>
    </data>
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
        <comment>This is a comment</comment>
    </data>
                
    There are any number of "resheader" rows that contain simple 
    name/value pairs.
    
    Each data row contains a name, and value. The row also contains a 
    type or mimetype. Type corresponds to a .NET class that support 
    text/value conversion through the TypeConverter architecture. 
    Classes that don't support this are serialized and stored with the 
    mimetype set.
    
    The mimetype is used for serialized objects, and tells the 
    ResXResourceReader how to depersist the object. This is currently not 
    extensible. For a given mimetype the value must be set accordingly:
    
    Note - application/x-microsoft.net.object.binary.base64 is the format 
    that the ResXResourceWriter will generate, however the reader can 
    read any of the formats listed below.
    
    mimetype: application/x-microsoft.net.object.binary.base64
    value   : The object must be serialized with 
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
            : and then encoded with base64 encoding.
    
    mimetype: application/x-microsoft.net.object.soap.base64
    value   : The object must be serialized with 
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
            : and then encoded with base64 encoding.

    mimetype: application/x-microsoft.net.object.bytearray.base64
    value   : The object must be serialized into a byte array 
            : using a System.ComponentModel.TypeConverter
            : and then encoded with base64 encoding.
    -->
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <metadata name="imageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>17, 17</value>
  </metadata>
  <data name="imageList.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
    <value>
        AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
        LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
        ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACG
        DwAAAk1TRnQBSQFMAgEBBgEAAQkBAAEEAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
        AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
        AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
        AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
        AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
        AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM
        AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA
        ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz
        AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ
        AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM
        AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA
        AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA
        AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ
        AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/
        AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA
        AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm
        ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ
        Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz
        AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA
        AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM
        AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM
        ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM
        Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA
        AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM
        AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ
        AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz
        AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm
        AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw
        AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/wEAAbwBkgHrCW0B6wHs
        AfcBBwUABHICcSUAAa4MtQLsAbUDAAFyAWwB7wHwAfEB8AG8AQcBkQFJIwABtAHdAxkBCQGLAYYBtQQJ
        AbUB7AG1AgABkQFyAfAB9AHxAfIB8wLyAfAB9wFsIgABtAQZAQkBiwGGAbUECQG1AesBtQEAAZEBcgHw
        Av8BmAGXAfIB/wHzAvIB7QFsIQABtAQZAd0DCQIZAgkBtQHrAbUBAAFyAZgD/wGXAQIBlwHzAf8B8wHy
        AfABciEAAbQEGQEJAYsBhgG1Ad0CGQEJAbUB6wG1Aa4BcgH0A/8BlwICAZgB8wH/AfIB8wGYAWwgAAG1
        BBkBCQG0AaYBiwEJAhkB3QG1AesBtQFyAZgE/wGXAgIBTwGYAvQB8wG8AXEgAAG1BRkBCQHPAaYBhgG1
        AQkB3QG1AesBtQFyAfIE/wGXAwIBTwEIAf8B8wHyAXIgAAG1ARkC9AQZAbQBhgGLAQkB3QG1AesBtQFy
        AfQE/wGXAwIBTwEIAf8C8wFyIAABtQEZAfEBtAGLAbQDGQGLAaYBtQHdAbUB6wG1AXIBCAT/AZcCAgFP
        AZgB/wH0AfMB8QFxIAABtQL0AbQBhgGLAbQBuwG0AYYBiwEJARkBtQHsAbUBrgFyBP8BlwECAU8BmAL/
        AvQB7wFsIAABtQL0ARkBtAGGA6YBrQEJAhkBtQHtAbUBAAFPAQgD/wGXAU8BmAP/AvQBciEAAbUB9AL/
        AfQB8wIJARkC3QEJAbUB7QHvAbwBAAFsAXID/wKYBf8BBwFsIQABtQH0BP8D9AHVAtQBtAH3AbwB3QIA
        AXEBwgf/AfQBvAFxIgABtQb/AvQBCQG6AZEB7QEHAfMBGQMAAXEBmAH0BP8B8wGYAXEjAAq1ARkBzwgA
        AZgGcgGYaQABtQGuAosBrgG1CgABBwFJAeoBEwEVAREBDwMOAgAB8AlJAhUB8RUAAQkBtAG7AfAC9AHx
        AbsBrgG1BwABBwEPAUkEcgFPAuoBDgEAAQcBEQF4Af8B8wHyAfEB8AK8AgcB7wEVAgAFrgJsA2YCbAOu
        AwABCQG1ARkBCQG0Aq0BtAEJAfIBrgG1AwABBwFJAeoB6wHzAUkBcgRQAU8BcgEOAQAB7QHvAVAJSQH3
        AUkCAAGuAf8B8wEJAbsB7QGuAWwBZgGuAfcB7wG8AbUBrgMAAbUBGQG1AqwBtQH/AscBtQHzAa4CAAEH
        AQ8BSQFyAQcBEAFJApcBcgNQAXIBEAEAAQcBEQFQAZgBcgJQBE8BSQGmAYoBGQEAAZEB8wGRAa4CbAGu
        AWwDrgJsAZEB6gIAAwkBrQKsAbQBtQGsAscBCQG7AbUBAAHrAfMBSQFyAesB8wFPA5cBcgJQAXIBDgEA
        AesB7wFQAZgCeASXAU8BSQGyAdMBigEAAZEB8wGuAd0BCQG1AbQBrgG0Ae8BtQG0Aa4BuQFsAgABtQH0
        AdUBzgKtAdYB/wOsAc8B8QGuAQABBwEQAUkBlwEHARABUAF4BJcCcgEOAQABBwERAXIBmAN4A5cBTwFJ
        AbIB0wGKAQABtAHzAa4C9AEJAbUBrgG0AQkB8gHzAa4BHAESAgABtQH/BM4B1QH/AQkBrQGsAa0B9AGL
        AQAB6wHzAU8BlwFtAfMBcgN4A5cBcgEPAQAB6wHvAXIBmAV4AZcBUAFJAScBAgEIAQABtQHxAa4C/wEZ
        AbUBrgEJAbUB3QH0Aa4B+wFQAgABtQH/AdUEzgHVAf8BGQKtAfQBiwEAAQcBEAFQAXgBBwEQAZcBmAFP
        AVABcgKXAXIBQwEAAQcBEQFyAQgCmAR4AVABSQJWAQIBAAG1AfABkQL/Ad0BtAGuAbUB8wH/AfMBkQHs
        ARMCAAEJAfQB1gHOAdUB3ALOAdUB/wHVAbQB8gGuAQABbQHzAXIBeAHqAfMBlwGYAU8DCAGXAXIBFAEA
        AesB7wFyAQgDmAN4AXIBSQJWAQIBAAG1AbwBtAH/AQkBtQHdAa4BCQG1AfQB8wG0AQcBEwIAAd0BCQHd
        Ac4B1QH/AQkB1QEJAf8BzgEJAbsBtQEAAQcBEAGXAZgB8AERAZcBmARPApcBEgEAAQcBEQFyAQgEmAJ4
        AXIBSQEqATABGwEAAbUBvAG0Af8B9AEJAbUBrgHzAf8B9AHzAbQBjgETAwABCQH0AQkBzgEJAv8B9AHV
        AQkBGQG0AgAB6gHzAZcBmAHqAfMBlweYAW0BAAFtAe8BcgEIBpgBlwFJATcBOAEwAQACCQG0Af8CCQHd
        AbQBCQH0AhkBtAHjAUUDAAEZAQkB9AHdAdYC1QHWAd0BGQG0AQkCAAHwAREBlwGYAfAB6wSXAnIBUAFP
        AfEBAAEHAREBlwEIBpgBlwFJATcBOAEwAQABuwG0AbUB/wHzAgkBAAEJAd0BGQEJAbUB7QGuBAABGQIJ
        AfQC/wH0ArUBCQMAAeoB8wGXB5gBbQUAAeoBBwGXAQgGmAGXAVACKgEbAwACtQEJBQABCQG1AbQIAAHd
        AQkDtQEJBQAB8AHrBJcCcgFQAU8B8QUAAfEBQwGXBwgBmAFQAbUB7TIAAfQBBwWXBXIB8RMAAUIBTQE+
        BwABPgMAASgDAAFAAwABIAMAAQEBAAEBBgABARYAA/8DAAH4AR8GAAHgAQcGAAHAAQMGAAGAAQEGAAGA
        AQE2AAGAAQEGAAGAAQEGAAHAAQMGAAHgAQcFAAEPAfABDwQACP8B+AEfAfgBAQGAAQMC/wHgAQcB8AEB
        AQABAwEAAQEBwAEDAYABAQEAAQMBAAEBAcABAwEAAQEBAAEBAQABAQGAAQEBAAEBAQABAQEAAQEBgAEB
        AQABAQEAAQEBAAEBAYABAQEAAQEBAAEBAQABAQGAAQEBAAEBAQABAQEAAQEBgAEBAQABAQEAAQEBAAEB
        AYABAQEAAQEBAAEBAQABAQHAAQMBAAEBAQABAQEAAQEBwAEDAQABAQEAAwEB4AEHAQABHwEAAQECxwH4
        AR8BAAEfAQABAwb/AQABBwL/Cw==
</value>
  </data>
</root>