Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 864d1c3c3cd8df4e3a2692faf8776e05 > files > 595

db4o-doc-7.4-2.fc13.i686.rpm

<html>
  <head>
    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Using Selection Criterias</title>
    <link rel="stylesheet" type="text/css" href="../../../style.css">
  </head>
  <body>
    <div class="CommonContent">
      <div class="CommonContentArea">
        <h1>Using Selection Criterias</h1><div id="TOC"><div id="TOCinner"><span class="TOCtitle">Contents</span><div class="TOCcontents"><ul><li><a href ="#SelectPilot5Points">SelectPilot5Points</a></li><li><a href ="#SelectTestPilots">SelectTestPilots</a></li><li><a href ="#SelectPilotsNumberX6">SelectPilotsNumberX6</a></li></ul></li></ul></div></div></div><script>
//We attach this function to a browser object as a variable so that if multiple of these blocks are
//present on the same page, then they will simply over-write eachother with the same function instead
//of generating a naming collision.
window.WikiCodeFormattingCopyToClipboard = function copyToClipboard(sID){
	var sContent = document.getElementById(sID).innerText;
	if( window.clipboardData && clipboardData.setData )
	{
		clipboardData.setData("Text", sContent);
	}
	else
	{
		alert("You must enable javascript access to your clipboard for this feature to work. Please referr to your browser documentation or Google search for instructions.");
	}
}
</script>
<p>The following examples show how to select objects matching a
specific criteria. <a href="store_pilots.html" class="wikiLink">Store Pilots</a> function is used to fill in the database.</p>
<a name="SelectPilot5Points"></a><h2>SelectPilot5Points</h2>
<p>Select only those pilots, which have 5 points.&nbsp;</p>



<span name="cs_wiki_filter" csw_filters="cs">

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">SimpleExamples.cs: <span class="fscMemberName">SelectPilot5Points</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #008080;">01</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/><span style="color: #0000FF;">private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">static</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> SelectPilot5Points()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_49_808_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_49_808_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_49_808_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_49_808_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_49_808_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_49_808_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_49_808_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_49_808_Open_Text').style.display='inline';"/>        </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_49_808_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_49_808_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">03</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            IObjectContainer container </span><span style="color: #000000;">=</span><span style="color: #000000;"> Database();
</span><span style="color: #008080;">04</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (container </span><span style="color: #000000;">!=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">null</span><span style="color: #000000;">)
</span><span style="color: #008080;">05</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_151_798_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_151_798_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_151_798_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_151_798_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_151_798_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_151_798_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_151_798_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_151_798_Open_Text').style.display='inline';"/>            </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_151_798_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_151_798_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">06</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">try</span><span style="color: #000000;">
</span><span style="color: #008080;">07</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_189_533_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_189_533_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_189_533_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_189_533_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_189_533_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_189_533_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_189_533_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_189_533_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_189_533_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_189_533_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    IList</span><span style="color: #000000;">&lt;</span><span style="color: #000000;">Pilot</span><span style="color: #000000;">&gt;</span><span style="color: #000000;"> result </span><span style="color: #000000;">=</span><span style="color: #000000;"> container.Query</span><span style="color: #000000;">&lt;</span><span style="color: #000000;">Pilot</span><span style="color: #000000;">&gt;</span><span style="color: #000000;">(</span><span style="color: #0000FF;">delegate</span><span style="color: #000000;">(Pilot pilot)
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_298_473_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_298_473_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_298_473_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_298_473_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_298_473_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_298_473_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_298_473_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_298_473_Open_Text').style.display='inline';"/>                    </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_298_473_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_298_473_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                        </span><span style="color: #008000;">//</span><span style="color: #008000;"> pilots with 5 points are included in the
</span><span style="color: #008080;">11</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                        </span><span style="color: #008000;">//</span><span style="color: #008000;"> result</span><span style="color: #008000;">
</span><span style="color: #008080;">12</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">                        </span><span style="color: #0000FF;">return</span><span style="color: #000000;"> pilot.Points </span><span style="color: #000000;">==</span><span style="color: #000000;"> </span><span style="color: #800080;">5</span><span style="color: #000000;">;
</span><span style="color: #008080;">13</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>                    }</span></span><span style="color: #000000;">);
</span><span style="color: #008080;">14</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    ListResult(result);
</span><span style="color: #008080;">15</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>                }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">16</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">catch</span><span style="color: #000000;"> (Exception ex)
</span><span style="color: #008080;">17</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_587_687_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_587_687_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_587_687_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_587_687_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_587_687_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_587_687_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_587_687_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_587_687_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_587_687_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_587_687_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">18</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    System.Console.WriteLine(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">System Exception: </span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> ex.Message);
</span><span style="color: #008080;">19</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>                }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">20</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">finally</span><span style="color: #000000;">
</span><span style="color: #008080;">21</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_728_784_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_728_784_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_728_784_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_728_784_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_728_784_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_728_784_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_728_784_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_728_784_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_728_784_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilot5Points_295_69_728_784_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">22</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    CloseDatabase();
</span><span style="color: #008080;">23</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>                }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">24</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>            }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">25</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>        }</span></span></div></pre></div></div>

</span>

<span name="cs_wiki_filter" csw_filters="vb">

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">SimpleExamples.vb: <span class="fscMemberName">SelectPilot5Points</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilot5Points_428_69"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #008080;">01</span><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilot5Points_428_69_15_546_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilot5Points_428_69_15_546_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilot5Points_428_69_15_546_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilot5Points_428_69_15_546_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilot5Points_428_69_15_546_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilot5Points_428_69_15_546_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilot5Points_428_69_15_546_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilot5Points_428_69_15_546_Open_Text').style.display='inline';"/><span style="color: #0000FF;">Private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Shared</span><span style="color: #000000;"> </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilot5Points_428_69_15_546_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub SelectPilot5Points()</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilot5Points_428_69_15_546_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> SelectPilot5Points()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> container </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IObjectContainer </span><span style="color: #000000;">=</span><span style="color: #000000;"> Database()
</span><span style="color: #008080;">03</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">If</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Not</span><span style="color: #000000;"> container </span><span style="color: #0000FF;">Is</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Nothing</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Then</span><span style="color: #000000;">
</span><span style="color: #008080;">04</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">Try</span><span style="color: #000000;">
</span><span style="color: #008080;">05</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> result </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IList(</span><span style="color: #0000FF;">Of</span><span style="color: #000000;"> Pilot) </span><span style="color: #000000;">=</span><span style="color: #000000;"> container.Query(</span><span style="color: #0000FF;">Of</span><span style="color: #000000;"> Pilot)(</span><span style="color: #0000FF;">AddressOf</span><span style="color: #000000;"> Pilot5PointsMatch)
</span><span style="color: #008080;">06</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    ListResult(result)
</span><span style="color: #008080;">07</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">Catch</span><span style="color: #000000;"> ex </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> Exception
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    System.Console.WriteLine(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">System Exception: </span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> ex.Message)
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">Finally</span><span style="color: #000000;">
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    CloseDatabase()
</span><span style="color: #008080;">11</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Try</span><span style="color: #000000;">
</span><span style="color: #008080;">12</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">If</span><span style="color: #000000;">
</span><span style="color: #008080;">13</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>        </span><span style="color: #0000FF;">End Sub</span></span></div></pre></div></div>

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">SimpleExamples.vb: <span class="fscMemberName">Pilot5PointsMatch</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_Pilot5PointsMatch_501_68"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #008080;">1</span><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_Pilot5PointsMatch_501_68_15_199_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_Pilot5PointsMatch_501_68_15_199_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_Pilot5PointsMatch_501_68_15_199_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_Pilot5PointsMatch_501_68_15_199_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_Pilot5PointsMatch_501_68_15_199_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_Pilot5PointsMatch_501_68_15_199_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_Pilot5PointsMatch_501_68_15_199_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_Pilot5PointsMatch_501_68_15_199_Open_Text').style.display='inline';"/><span style="color: #0000FF;">Private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Shared</span><span style="color: #000000;"> </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_Pilot5PointsMatch_501_68_15_199_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Function Pilot5PointsMatch()</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_Pilot5PointsMatch_501_68_15_199_Open_Text"><span style="color: #0000FF;">Function</span><span style="color: #000000;"> Pilot5PointsMatch(</span><span style="color: #0000FF;">ByVal</span><span style="color: #000000;"> p </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> Pilot) </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Boolean</span><span style="color: #000000;">
</span><span style="color: #008080;">2</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #008000;">'</span><span style="color: #008000;"> pilots with 5 points are included in the</span><span style="color: #008000;">
</span><span style="color: #008080;">3</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">            </span><span style="color: #008000;">'</span><span style="color: #008000;"> result</span><span style="color: #008000;">
</span><span style="color: #008080;">4</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">            </span><span style="color: #0000FF;">Return</span><span style="color: #000000;"> p.Points </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800080;">5</span><span style="color: #000000;">
</span><span style="color: #008080;">5</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>        </span><span style="color: #0000FF;">End Function</span></span></div></pre></div></div>


</span>

<a name="SelectTestPilots"></a><h2>SelectTestPilots</h2>
<p>Select all pilots, whose name includes "Test".<br></p>



<span name="cs_wiki_filter" csw_filters="cs">

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">SimpleExamples.cs: <span class="fscMemberName">SelectTestPilots</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #008080;">01</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/><span style="color: #0000FF;">private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">static</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> SelectTestPilots()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_47_840_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_47_840_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_47_840_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_47_840_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_47_840_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_47_840_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_47_840_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_47_840_Open_Text').style.display='inline';"/>        </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_47_840_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_47_840_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">03</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            IObjectContainer container </span><span style="color: #000000;">=</span><span style="color: #000000;"> Database();
</span><span style="color: #008080;">04</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (container </span><span style="color: #000000;">!=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">null</span><span style="color: #000000;">)
</span><span style="color: #008080;">05</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_149_830_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_149_830_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_149_830_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_149_830_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_149_830_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_149_830_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_149_830_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_149_830_Open_Text').style.display='inline';"/>            </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_149_830_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_149_830_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">06</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">try</span><span style="color: #000000;">
</span><span style="color: #008080;">07</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_187_565_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_187_565_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_187_565_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_187_565_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_187_565_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_187_565_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_187_565_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_187_565_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_187_565_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_187_565_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    IList</span><span style="color: #000000;">&lt;</span><span style="color: #000000;">Pilot</span><span style="color: #000000;">&gt;</span><span style="color: #000000;"> result </span><span style="color: #000000;">=</span><span style="color: #000000;"> container.Query</span><span style="color: #000000;">&lt;</span><span style="color: #000000;">Pilot</span><span style="color: #000000;">&gt;</span><span style="color: #000000;">(</span><span style="color: #0000FF;">delegate</span><span style="color: #000000;">(Pilot pilot)
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_296_505_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_296_505_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_296_505_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_296_505_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_296_505_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_296_505_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_296_505_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_296_505_Open_Text').style.display='inline';"/>                    </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_296_505_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_296_505_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                        </span><span style="color: #008000;">//</span><span style="color: #008000;"> all Pilots containing &quot;Test&quot; in the name
</span><span style="color: #008080;">11</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                        </span><span style="color: #008000;">//</span><span style="color: #008000;"> are included in the result</span><span style="color: #008000;">
</span><span style="color: #008080;">12</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">                        </span><span style="color: #0000FF;">return</span><span style="color: #000000;"> pilot.Name.IndexOf(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Test</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">) </span><span style="color: #000000;">&gt;=</span><span style="color: #000000;"> </span><span style="color: #800080;">0</span><span style="color: #000000;">;
</span><span style="color: #008080;">13</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>                    }</span></span><span style="color: #000000;">);
</span><span style="color: #008080;">14</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    ListResult(result);
</span><span style="color: #008080;">15</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>                }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">16</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">catch</span><span style="color: #000000;"> (Exception ex)
</span><span style="color: #008080;">17</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_619_719_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_619_719_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_619_719_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_619_719_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_619_719_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_619_719_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_619_719_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_619_719_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_619_719_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_619_719_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">18</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    System.Console.WriteLine(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">System Exception: </span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> ex.Message);
</span><span style="color: #008080;">19</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>                }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">20</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">finally</span><span style="color: #000000;">
</span><span style="color: #008080;">21</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_760_816_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_760_816_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_760_816_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_760_816_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_760_816_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_760_816_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_760_816_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_760_816_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_760_816_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots_727_67_760_816_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">22</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    CloseDatabase();
</span><span style="color: #008080;">23</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>                }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">24</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>            }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">25</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>        }</span></span></div></pre></div></div>

</span>

<span name="cs_wiki_filter" csw_filters="vb">

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">SimpleExamples.vb: <span class="fscMemberName">SelectTestPilots</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectTestPilots_858_67"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #008080;">01</span><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectTestPilots_858_67_15_542_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectTestPilots_858_67_15_542_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectTestPilots_858_67_15_542_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectTestPilots_858_67_15_542_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectTestPilots_858_67_15_542_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectTestPilots_858_67_15_542_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectTestPilots_858_67_15_542_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectTestPilots_858_67_15_542_Open_Text').style.display='inline';"/><span style="color: #0000FF;">Private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Shared</span><span style="color: #000000;"> </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectTestPilots_858_67_15_542_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub SelectTestPilots()</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectTestPilots_858_67_15_542_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> SelectTestPilots()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> container </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IObjectContainer </span><span style="color: #000000;">=</span><span style="color: #000000;"> Database()
</span><span style="color: #008080;">03</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">If</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Not</span><span style="color: #000000;"> container </span><span style="color: #0000FF;">Is</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Nothing</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Then</span><span style="color: #000000;">
</span><span style="color: #008080;">04</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">Try</span><span style="color: #000000;">
</span><span style="color: #008080;">05</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> result </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IList(</span><span style="color: #0000FF;">Of</span><span style="color: #000000;"> Pilot) </span><span style="color: #000000;">=</span><span style="color: #000000;"> container.Query(</span><span style="color: #0000FF;">Of</span><span style="color: #000000;"> Pilot)(</span><span style="color: #0000FF;">AddressOf</span><span style="color: #000000;"> TestPilotsMatch)
</span><span style="color: #008080;">06</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    ListResult(result)
</span><span style="color: #008080;">07</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">Catch</span><span style="color: #000000;"> ex </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> Exception
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    System.Console.WriteLine(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">System Exception: </span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> ex.Message)
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">Finally</span><span style="color: #000000;">
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    CloseDatabase()
</span><span style="color: #008080;">11</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Try</span><span style="color: #000000;">
</span><span style="color: #008080;">12</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">If</span><span style="color: #000000;">
</span><span style="color: #008080;">13</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>        </span><span style="color: #0000FF;">End Sub</span></span></div></pre></div></div>

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">SimpleExamples.vb: <span class="fscMemberName">TestPilotsMatch</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_TestPilotsMatch_929_66"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #008080;">1</span><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_TestPilotsMatch_929_66_15_232_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_TestPilotsMatch_929_66_15_232_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_TestPilotsMatch_929_66_15_232_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_TestPilotsMatch_929_66_15_232_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_TestPilotsMatch_929_66_15_232_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_TestPilotsMatch_929_66_15_232_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_TestPilotsMatch_929_66_15_232_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_TestPilotsMatch_929_66_15_232_Open_Text').style.display='inline';"/><span style="color: #0000FF;">Private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Shared</span><span style="color: #000000;"> </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_TestPilotsMatch_929_66_15_232_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Function TestPilotsMatch()</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_TestPilotsMatch_929_66_15_232_Open_Text"><span style="color: #0000FF;">Function</span><span style="color: #000000;"> TestPilotsMatch(</span><span style="color: #0000FF;">ByVal</span><span style="color: #000000;"> p </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> Pilot) </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Boolean</span><span style="color: #000000;">
</span><span style="color: #008080;">2</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #008000;">'</span><span style="color: #008000;"> all Pilots containing &quot;Test&quot; in the name</span><span style="color: #008000;">
</span><span style="color: #008080;">3</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">            </span><span style="color: #008000;">'</span><span style="color: #008000;"> are included in the result</span><span style="color: #008000;">
</span><span style="color: #008080;">4</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">            </span><span style="color: #0000FF;">Return</span><span style="color: #000000;"> p.Name.IndexOf(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Test</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">) </span><span style="color: #000000;">&gt;=</span><span style="color: #000000;"> </span><span style="color: #800080;">0</span><span style="color: #000000;">
</span><span style="color: #008080;">5</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>        </span><span style="color: #0000FF;">End Function</span></span></div></pre></div></div>


</span>

<a name="SelectPilotsNumberX6"></a><h2>SelectPilotsNumberX6</h2>
<p>Select those pilots, whose name (number) ends with 6.</p>



<span name="cs_wiki_filter" csw_filters="cs">

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">SimpleExamples.cs: <span class="fscMemberName">SelectPilotsNumberX6</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #008080;">01</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/><span style="color: #0000FF;">private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">static</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> SelectPilotsNumberX6()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_51_825_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_51_825_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_51_825_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_51_825_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_51_825_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_51_825_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_51_825_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_51_825_Open_Text').style.display='inline';"/>        </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_51_825_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_51_825_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">03</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            IObjectContainer container </span><span style="color: #000000;">=</span><span style="color: #000000;"> Database();
</span><span style="color: #008080;">04</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (container </span><span style="color: #000000;">!=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">null</span><span style="color: #000000;">)
</span><span style="color: #008080;">05</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_153_815_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_153_815_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_153_815_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_153_815_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_153_815_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_153_815_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_153_815_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_153_815_Open_Text').style.display='inline';"/>            </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_153_815_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_153_815_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">06</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">try</span><span style="color: #000000;">
</span><span style="color: #008080;">07</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_191_550_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_191_550_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_191_550_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_191_550_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_191_550_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_191_550_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_191_550_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_191_550_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_191_550_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_191_550_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    IList</span><span style="color: #000000;">&lt;</span><span style="color: #000000;">Pilot</span><span style="color: #000000;">&gt;</span><span style="color: #000000;"> result </span><span style="color: #000000;">=</span><span style="color: #000000;"> container.Query</span><span style="color: #000000;">&lt;</span><span style="color: #000000;">Pilot</span><span style="color: #000000;">&gt;</span><span style="color: #000000;">(</span><span style="color: #0000FF;">delegate</span><span style="color: #000000;">(Pilot pilot)
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_300_490_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_300_490_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_300_490_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_300_490_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_300_490_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_300_490_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_300_490_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_300_490_Open_Text').style.display='inline';"/>                    </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_300_490_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_300_490_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                        </span><span style="color: #008000;">//</span><span style="color: #008000;"> all Pilots with the name ending with 6 will
</span><span style="color: #008080;">11</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                        </span><span style="color: #008000;">//</span><span style="color: #008000;"> be included</span><span style="color: #008000;">
</span><span style="color: #008080;">12</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">                        </span><span style="color: #0000FF;">return</span><span style="color: #000000;"> pilot.Name.EndsWith(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">6</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">);
</span><span style="color: #008080;">13</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>                    }</span></span><span style="color: #000000;">);
</span><span style="color: #008080;">14</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    ListResult(result);
</span><span style="color: #008080;">15</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>                }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">16</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">catch</span><span style="color: #000000;"> (Exception ex)
</span><span style="color: #008080;">17</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_604_704_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_604_704_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_604_704_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_604_704_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_604_704_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_604_704_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_604_704_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_604_704_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_604_704_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_604_704_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">18</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    System.Console.WriteLine(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">System Exception: </span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> ex.Message);
</span><span style="color: #008080;">19</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>                }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">20</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">finally</span><span style="color: #000000;">
</span><span style="color: #008080;">21</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_745_801_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_745_801_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_745_801_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_745_801_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_745_801_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_745_801_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_745_801_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_745_801_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_745_801_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsNumberX6_1160_71_745_801_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">22</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    CloseDatabase();
</span><span style="color: #008080;">23</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>                }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">24</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>            }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">25</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>        }</span></span></div></pre></div></div>

</span>

<span name="cs_wiki_filter" csw_filters="vb">

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">SimpleExamples.vb: <span class="fscMemberName">SelectPilotsNumberX6</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsNumberX6_1295_71"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #008080;">01</span><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsNumberX6_1295_71_15_544_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsNumberX6_1295_71_15_544_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsNumberX6_1295_71_15_544_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsNumberX6_1295_71_15_544_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsNumberX6_1295_71_15_544_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsNumberX6_1295_71_15_544_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsNumberX6_1295_71_15_544_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsNumberX6_1295_71_15_544_Open_Text').style.display='inline';"/><span style="color: #0000FF;">Private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Shared</span><span style="color: #000000;"> </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsNumberX6_1295_71_15_544_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub SelectPilotsNumberX6()</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsNumberX6_1295_71_15_544_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> SelectPilotsNumberX6()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> container </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IObjectContainer </span><span style="color: #000000;">=</span><span style="color: #000000;"> Database()
</span><span style="color: #008080;">03</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">If</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Not</span><span style="color: #000000;"> container </span><span style="color: #0000FF;">Is</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Nothing</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Then</span><span style="color: #000000;">
</span><span style="color: #008080;">04</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">Try</span><span style="color: #000000;">
</span><span style="color: #008080;">05</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> result </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IList(</span><span style="color: #0000FF;">Of</span><span style="color: #000000;"> Pilot) </span><span style="color: #000000;">=</span><span style="color: #000000;"> container.Query(</span><span style="color: #0000FF;">Of</span><span style="color: #000000;"> Pilot)(</span><span style="color: #0000FF;">AddressOf</span><span style="color: #000000;"> PilotsX6Match)
</span><span style="color: #008080;">06</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    ListResult(result)
</span><span style="color: #008080;">07</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">Catch</span><span style="color: #000000;"> ex </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> Exception
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    System.Console.WriteLine(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">System Exception: </span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> ex.Message)
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">Finally</span><span style="color: #000000;">
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    CloseDatabase()
</span><span style="color: #008080;">11</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Try</span><span style="color: #000000;">
</span><span style="color: #008080;">12</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">If</span><span style="color: #000000;">
</span><span style="color: #008080;">13</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>        </span><span style="color: #0000FF;">End Sub</span></span></div></pre></div></div>

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">SimpleExamples.vb: <span class="fscMemberName">PilotsX6Match</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_PilotsX6Match_1370_64"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #008080;">1</span><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_PilotsX6Match_1370_64_15_211_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_PilotsX6Match_1370_64_15_211_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_PilotsX6Match_1370_64_15_211_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_PilotsX6Match_1370_64_15_211_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_PilotsX6Match_1370_64_15_211_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_PilotsX6Match_1370_64_15_211_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_PilotsX6Match_1370_64_15_211_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_PilotsX6Match_1370_64_15_211_Open_Text').style.display='inline';"/><span style="color: #0000FF;">Private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Shared</span><span style="color: #000000;"> </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_PilotsX6Match_1370_64_15_211_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Function PilotsX6Match()</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_PilotsX6Match_1370_64_15_211_Open_Text"><span style="color: #0000FF;">Function</span><span style="color: #000000;"> PilotsX6Match(</span><span style="color: #0000FF;">ByVal</span><span style="color: #000000;"> p </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> Pilot) </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Boolean</span><span style="color: #000000;">
</span><span style="color: #008080;">2</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #008000;">'</span><span style="color: #008000;"> all Pilots with the name ending with 6 will</span><span style="color: #008000;">
</span><span style="color: #008080;">3</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">            </span><span style="color: #008000;">'</span><span style="color: #008000;"> be included</span><span style="color: #008000;">
</span><span style="color: #008080;">4</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">            </span><span style="color: #0000FF;">Return</span><span style="color: #000000;"> p.Name.EndsWith(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">6</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">)
</span><span style="color: #008080;">5</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>        </span><span style="color: #0000FF;">End Function</span></span></div></pre></div></div>

</span></div>
    </div>
    <div id="footer">
					This revision (3) was last Modified 2007-09-16T16:50:19 by Tetyana.
				</div>
  </body>
</html>