<?xml version="1.0"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>From...Order By...Select query</Title>
      <Author>Microsoft Corporation</Author>
      <Description>Creates a query with From, Order By, and Select clauses.</Description>
      <Shortcut>qFromOBSelect</Shortcut>
    </Header>
    <Snippet>
      <Declarations>
        <Literal>
          <ID>queryResult</ID>
          <Type>item</Type>
          <ToolTip>Replace with the identifier for the query.</ToolTip>
          <Default>query</Default>
        </Literal>
        <Literal>
          <ID>item</ID>
          <Type>item</Type>
          <ToolTip>Replace with the identifier for the range variable that represents an item from your data source.</ToolTip>
          <Default>fruit</Default>
        </Literal>
        <Literal>
          <ID>dataSource</ID>
          <Type>String</Type>
          <ToolTip>Replace with the identifier for your data source.</ToolTip>
          <Default>New String() {"apple", "orange", "pear", "banana"}</Default>
        </Literal>
        <Literal>
          <ID>field1</ID>
          <Type>String</Type>
          <ToolTip>Replace with the identifier for the first field you want to retrieve from your data source.</ToolTip>
          <Default>ToUpper()</Default>
        </Literal>
        <Literal>
          <ID>field2</ID>
          <Type>String</Type>
          <ToolTip>Replace with the identifier for the second field you want to retrieve from your data source.</ToolTip>
          <Default>ToLower()</Default>
        </Literal>
        <Literal>
          <ID>orderField</ID>
          <Type>String</Type>
          <ToolTip>Replace with the name of the field you want to order by.</ToolTip>
          <Default>Length</Default>
        </Literal>
      </Declarations>
      <Code Language="VB" Kind="method body"><![CDATA[Dim $queryResult$ = From $item$ In $dataSource$ _
                    Order By $item$.$orderField$ _
                    Select $item$.$field1$, $item$.$field2$]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>