Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 864d1c3c3cd8df4e3a2692faf8776e05 > files > 589

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

<html>
  <head>
    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Selecting Ranges</title>
    <link rel="stylesheet" type="text/css" href="../../../style.css">
  </head>
  <body>
    <div class="CommonContent">
      <div class="CommonContentArea">
        <h1>Selecting Ranges</h1><div id="TOC"><div id="TOCinner"><span class="TOCtitle">Contents</span><div class="TOCcontents"><ul><li><a href ="#SelectTestPilots6PointsMore">SelectTestPilots6PointsMore</a></li><li><a href ="#SelectPilots6To12Points">SelectPilots6To12Points</a></li><li><a href ="#SelectPilotsRandom">SelectPilotsRandom</a></li><li><a href ="#SelectPilotsEven">SelectPilotsEven</a></li><li><a href ="#SelectAnyOnePilot">SelectAnyOnePilot</a></li><li><a href ="#SelectDistinctPilots">SelectDistinctPilots</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>This group of examples shows how to select ranges of objects. <a href="store_pilots.html" class="wikiLink">Store Pilots</a> function is used to fill in the database.</p>
<a name="SelectTestPilots6PointsMore"></a><h2>SelectTestPilots6PointsMore</h2>
<p>Select "Test" pilots with the points range of more than 6.<br></p>



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

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">SimpleExamples.cs: <span class="fscMemberName">SelectTestPilots6PointsMore</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78"><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;"> SelectTestPilots6PointsMore()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_58_960_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_SelectTestPilots6PointsMore_299_78_58_960_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_58_960_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_58_960_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_58_960_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_SelectTestPilots6PointsMore_299_78_58_960_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_58_960_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_58_960_Open_Text').style.display='inline';"/>        </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_58_960_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_58_960_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_SelectTestPilots6PointsMore_299_78_160_950_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_SelectTestPilots6PointsMore_299_78_160_950_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_160_950_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_160_950_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_160_950_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_SelectTestPilots6PointsMore_299_78_160_950_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_160_950_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_160_950_Open_Text').style.display='inline';"/>            </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_160_950_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_160_950_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_SelectTestPilots6PointsMore_299_78_198_685_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_SelectTestPilots6PointsMore_299_78_198_685_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_198_685_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_198_685_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_198_685_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_SelectTestPilots6PointsMore_299_78_198_685_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_198_685_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_198_685_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_198_685_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_198_685_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_SelectTestPilots6PointsMore_299_78_307_625_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_SelectTestPilots6PointsMore_299_78_307_625_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_307_625_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_307_625_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_307_625_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_SelectTestPilots6PointsMore_299_78_307_625_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_307_625_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_307_625_Open_Text').style.display='inline';"/>                    </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_307_625_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_307_625_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;"> and 6 point 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;">bool</span><span style="color: #000000;"> b1 </span><span style="color: #000000;">=</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/InBlock.gif" align="top"/>                        </span><span style="color: #0000FF;">bool</span><span style="color: #000000;"> b2 </span><span style="color: #000000;">=</span><span style="color: #000000;"> pilot.Points </span><span style="color: #000000;">&gt;</span><span style="color: #000000;"> </span><span style="color: #800080;">6</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"/>                        </span><span style="color: #0000FF;">return</span><span style="color: #000000;"> b1 </span><span style="color: #000000;">&amp;&amp;</span><span style="color: #000000;"> b2;
</span><span style="color: #008080;">15</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">16</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;">17</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    ListResult(result);
</span><span style="color: #008080;">18</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;">19</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;">20</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_739_839_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_SelectTestPilots6PointsMore_299_78_739_839_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_739_839_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_739_839_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_739_839_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_SelectTestPilots6PointsMore_299_78_739_839_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_739_839_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_739_839_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_739_839_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_739_839_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">21</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;">22</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;">23</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;">24</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_880_936_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_SelectTestPilots6PointsMore_299_78_880_936_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_880_936_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_880_936_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_880_936_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_SelectTestPilots6PointsMore_299_78_880_936_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_880_936_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_880_936_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_880_936_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectTestPilots6PointsMore_299_78_880_936_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">25</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    CloseDatabase();
</span><span style="color: #008080;">26</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;">27</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;">28</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">SelectTestPilots6PointsMore</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectTestPilots6PointsMore_441_78"><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_SelectTestPilots6PointsMore_441_78_15_564_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_SelectTestPilots6PointsMore_441_78_15_564_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectTestPilots6PointsMore_441_78_15_564_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectTestPilots6PointsMore_441_78_15_564_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectTestPilots6PointsMore_441_78_15_564_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_SelectTestPilots6PointsMore_441_78_15_564_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectTestPilots6PointsMore_441_78_15_564_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectTestPilots6PointsMore_441_78_15_564_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_SelectTestPilots6PointsMore_441_78_15_564_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub SelectTestPilots6PointsMore()</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectTestPilots6PointsMore_441_78_15_564_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> SelectTestPilots6PointsMore()
</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;"> TestPilots6PointsMoreMatch)
</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">TestPilots6PointsMoreMatch</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_TestPilots6PointsMoreMatch_523_77"><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_TestPilots6PointsMoreMatch_523_77_15_346_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_TestPilots6PointsMoreMatch_523_77_15_346_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_TestPilots6PointsMoreMatch_523_77_15_346_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_TestPilots6PointsMoreMatch_523_77_15_346_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_TestPilots6PointsMoreMatch_523_77_15_346_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_TestPilots6PointsMoreMatch_523_77_15_346_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_TestPilots6PointsMoreMatch_523_77_15_346_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_TestPilots6PointsMoreMatch_523_77_15_346_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_TestPilots6PointsMoreMatch_523_77_15_346_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Function TestPilots6PointsMoreMatch()</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_TestPilots6PointsMoreMatch_523_77_15_346_Open_Text"><span style="color: #0000FF;">Function</span><span style="color: #000000;"> TestPilots6PointsMoreMatch(</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;"> and 6 point 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;">Dim</span><span style="color: #000000;"> b1 </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: #000000;">=</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/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> b2 </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: #000000;">=</span><span style="color: #000000;"> p.Points </span><span style="color: #000000;">&gt;</span><span style="color: #000000;"> </span><span style="color: #800080;">6</span><span style="color: #000000;">
</span><span style="color: #008080;">6</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">Return</span><span style="color: #000000;"> b1 </span><span style="color: #0000FF;">AndAlso</span><span style="color: #000000;"> b2
</span><span style="color: #008080;">7</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="SelectPilots6To12Points"></a><h2>SelectPilots6To12Points</h2>
<p>Select all pilots, who have points in [6,12] range.&nbsp;</p>



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

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">SimpleExamples.cs: <span class="fscMemberName">SelectPilots6To12Points</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74"><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;"> SelectPilots6To12Points()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_54_853_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_SelectPilots6To12Points_770_74_54_853_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_54_853_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_54_853_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_54_853_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_SelectPilots6To12Points_770_74_54_853_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_54_853_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_54_853_Open_Text').style.display='inline';"/>        </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_54_853_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_54_853_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_SelectPilots6To12Points_770_74_156_843_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_SelectPilots6To12Points_770_74_156_843_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_156_843_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_156_843_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_156_843_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_SelectPilots6To12Points_770_74_156_843_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_156_843_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_156_843_Open_Text').style.display='inline';"/>            </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_156_843_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_156_843_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_SelectPilots6To12Points_770_74_194_578_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_SelectPilots6To12Points_770_74_194_578_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_194_578_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_194_578_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_194_578_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_SelectPilots6To12Points_770_74_194_578_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_194_578_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_194_578_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_194_578_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_194_578_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_SelectPilots6To12Points_770_74_303_518_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_SelectPilots6To12Points_770_74_303_518_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_303_518_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_303_518_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_303_518_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_SelectPilots6To12Points_770_74_303_518_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_303_518_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_303_518_Open_Text').style.display='inline';"/>                    </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_303_518_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_303_518_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 having 6 to 12 point are
</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;"> 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.Points </span><span style="color: #000000;">&gt;=</span><span style="color: #000000;"> </span><span style="color: #800080;">6</span><span style="color: #000000;">) </span><span style="color: #000000;">&amp;&amp;</span><span style="color: #000000;"> (pilot.Points </span><span style="color: #000000;">&lt;=</span><span style="color: #000000;"> </span><span style="color: #800080;">12</span><span style="color: #000000;">));
</span><span style="color: #008080;">13</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">14</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;">15</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    ListResult(result);
</span><span style="color: #008080;">16</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;">17</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;">18</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_632_732_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_SelectPilots6To12Points_770_74_632_732_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_632_732_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_632_732_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_632_732_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_SelectPilots6To12Points_770_74_632_732_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_632_732_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_632_732_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_632_732_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_632_732_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">19</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;">20</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;">21</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;">22</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_773_829_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_SelectPilots6To12Points_770_74_773_829_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_773_829_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_773_829_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_773_829_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_SelectPilots6To12Points_770_74_773_829_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_773_829_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_773_829_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_773_829_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilots6To12Points_770_74_773_829_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">23</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    CloseDatabase();
</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/ExpandedSubBlockEnd.gif" align="top"/>            }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">26</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">SelectPilots6To12Points</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilots6To12Points_908_74"><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_SelectPilots6To12Points_908_74_15_556_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_SelectPilots6To12Points_908_74_15_556_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilots6To12Points_908_74_15_556_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilots6To12Points_908_74_15_556_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilots6To12Points_908_74_15_556_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_SelectPilots6To12Points_908_74_15_556_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilots6To12Points_908_74_15_556_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilots6To12Points_908_74_15_556_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_SelectPilots6To12Points_908_74_15_556_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub SelectPilots6To12Points()</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilots6To12Points_908_74_15_556_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> SelectPilots6To12Points()
</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;"> Pilots6To12PointsMatch)
</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">Pilots6To12PointsMatch</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_Pilots6To12PointsMatch_986_73"><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_Pilots6To12PointsMatch_986_73_15_245_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_Pilots6To12PointsMatch_986_73_15_245_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_Pilots6To12PointsMatch_986_73_15_245_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_Pilots6To12PointsMatch_986_73_15_245_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_Pilots6To12PointsMatch_986_73_15_245_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_Pilots6To12PointsMatch_986_73_15_245_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_Pilots6To12PointsMatch_986_73_15_245_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_Pilots6To12PointsMatch_986_73_15_245_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_Pilots6To12PointsMatch_986_73_15_245_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Function Pilots6To12PointsMatch()</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_Pilots6To12PointsMatch_986_73_15_245_Open_Text"><span style="color: #0000FF;">Function</span><span style="color: #000000;"> Pilots6To12PointsMatch(</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 having 6 to 12 point are</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;"> 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.Points </span><span style="color: #000000;">&gt;=</span><span style="color: #000000;"> </span><span style="color: #800080;">6</span><span style="color: #000000;">) </span><span style="color: #0000FF;">AndAlso</span><span style="color: #000000;"> (p.Points </span><span style="color: #000000;">&lt;=</span><span style="color: #000000;"> </span><span style="color: #800080;">12</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="SelectPilotsRandom"></a><h2>SelectPilotsRandom</h2>
<p>Select pilots randomly: random array of point values is generated, those pilots who have points values within this array are included in the result set.&nbsp;</p>



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

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">SimpleExamples.cs: <span class="fscMemberName">SelectPilotsRandom</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_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;"> SelectPilotsRandom()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_49_603_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_SelectPilotsRandom_1325_69_49_603_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_49_603_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_49_603_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_49_603_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_SelectPilotsRandom_1325_69_49_603_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_49_603_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_49_603_Open_Text').style.display='inline';"/>        </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_49_603_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_49_603_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_SelectPilotsRandom_1325_69_151_593_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_SelectPilotsRandom_1325_69_151_593_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_151_593_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_151_593_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_151_593_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_SelectPilotsRandom_1325_69_151_593_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_151_593_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_151_593_Open_Text').style.display='inline';"/>            </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_151_593_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_151_593_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_SelectPilotsRandom_1325_69_189_328_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_SelectPilotsRandom_1325_69_189_328_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_189_328_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_189_328_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_189_328_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_SelectPilotsRandom_1325_69_189_328_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_189_328_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_189_328_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_189_328_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_189_328_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"/>                    IObjectSet result </span><span style="color: #000000;">=</span><span style="color: #000000;"> container.Query(</span><span style="color: #0000FF;">new</span><span style="color: #000000;"> RandomPredicate());
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    ListResult(result);
</span><span style="color: #008080;">10</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;">11</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;">12</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_382_482_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_SelectPilotsRandom_1325_69_382_482_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_382_482_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_382_482_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_382_482_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_SelectPilotsRandom_1325_69_382_482_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_382_482_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_382_482_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_382_482_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_382_482_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">13</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;">14</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;">15</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;">16</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_523_579_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_SelectPilotsRandom_1325_69_523_579_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_523_579_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_523_579_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_523_579_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_SelectPilotsRandom_1325_69_523_579_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_523_579_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_523_579_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_523_579_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsRandom_1325_69_523_579_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">17</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    CloseDatabase();
</span><span style="color: #008080;">18</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;">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/ExpandedBlockEnd.gif" align="top"/>        }</span></span></div></pre></div></div>

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">SimpleExamples.cs: <span class="fscMemberName">RandomPredicate</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66"><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;">class</span><span style="color: #000000;"> RandomPredicate : Db4objects.Db4o.Query.Predicate
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_72_846_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_RandomPredicate_1398_66_72_846_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_72_846_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_72_846_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_72_846_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_RandomPredicate_1398_66_72_846_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_72_846_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_72_846_Open_Text').style.display='inline';"/>        </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_72_846_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_72_846_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"/>            </span><span style="color: #0000FF;">private</span><span style="color: #000000;"> IList randomArray </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;">04</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</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;">private</span><span style="color: #000000;"> IList GetRandomArray()
</span><span style="color: #008080;">06</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_176_604_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_RandomPredicate_1398_66_176_604_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_176_604_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_176_604_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_176_604_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_RandomPredicate_1398_66_176_604_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_176_604_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_176_604_Open_Text').style.display='inline';"/>            </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_176_604_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_176_604_Open_Text"><span style="color: #000000;">{
</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;">if</span><span style="color: #000000;"> (randomArray </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;">08</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_235_554_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_RandomPredicate_1398_66_235_554_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_235_554_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_235_554_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_235_554_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_RandomPredicate_1398_66_235_554_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_235_554_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_235_554_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_235_554_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_235_554_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    Random rand </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> Random();
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    randomArray </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> ArrayList();
</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;">for</span><span style="color: #000000;"> (</span><span style="color: #0000FF;">int</span><span style="color: #000000;"> i </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800080;">0</span><span style="color: #000000;">; i </span><span style="color: #000000;">&lt;</span><span style="color: #000000;"> </span><span style="color: #800080;">10</span><span style="color: #000000;">; i</span><span style="color: #000000;">++</span><span style="color: #000000;">)
</span><span style="color: #008080;">12</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_405_536_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_RandomPredicate_1398_66_405_536_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_405_536_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_405_536_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_405_536_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_RandomPredicate_1398_66_405_536_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_405_536_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_405_536_Open_Text').style.display='inline';"/>                    </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_405_536_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_405_536_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">13</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                        </span><span style="color: #0000FF;">int</span><span style="color: #000000;"> random </span><span style="color: #000000;">=</span><span style="color: #000000;"> (</span><span style="color: #0000FF;">int</span><span style="color: #000000;">)(rand.Next(</span><span style="color: #800080;">10</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"/>                        randomArray.Add(random);
</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/ExpandedSubBlockEnd.gif" align="top"/>                }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">17</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">return</span><span style="color: #000000;"> randomArray;
</span><span style="color: #008080;">18</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;">19</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</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;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">bool</span><span style="color: #000000;"> Match(Pilot pilot)
</span><span style="color: #008080;">21</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_661_836_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_RandomPredicate_1398_66_661_836_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_661_836_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_661_836_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_661_836_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_RandomPredicate_1398_66_661_836_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_661_836_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_661_836_Open_Text').style.display='inline';"/>            </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_661_836_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_RandomPredicate_1398_66_661_836_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"/>                </span><span style="color: #008000;">//</span><span style="color: #008000;"> all Pilots having points in the values of
</span><span style="color: #008080;">23</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;"> the randomArray</span><span style="color: #008000;">
</span><span style="color: #008080;">24</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;"> GetRandomArray().Contains(pilot.Points);
</span><span style="color: #008080;">25</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;">26</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">SelectPilotsRandom</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsRandom_1528_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_SelectPilotsRandom_1528_69_15_525_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_SelectPilotsRandom_1528_69_15_525_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsRandom_1528_69_15_525_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsRandom_1528_69_15_525_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsRandom_1528_69_15_525_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_SelectPilotsRandom_1528_69_15_525_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsRandom_1528_69_15_525_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsRandom_1528_69_15_525_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_SelectPilotsRandom_1528_69_15_525_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub SelectPilotsRandom()</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsRandom_1528_69_15_525_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> SelectPilotsRandom()
</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;"> IObjectSet </span><span style="color: #000000;">=</span><span style="color: #000000;"> container.Query(</span><span style="color: #0000FF;">New</span><span style="color: #000000;"> RandomPredicate())
</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">RandomPredicate</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66"><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_RandomPredicate_1601_66_8_901_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_RandomPredicate_1601_66_8_901_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_8_901_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_8_901_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_8_901_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_RandomPredicate_1601_66_8_901_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_8_901_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_8_901_Open_Text').style.display='inline';"/><span style="color: #0000FF;">Private</span><span style="color: #000000;"> </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_8_901_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Class RandomPredicate</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_8_901_Open_Text"><span style="color: #0000FF;">Class</span><span style="color: #000000;"> RandomPredicate
</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;">Inherits</span><span style="color: #000000;"> Query.Predicate
</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;">Private</span><span style="color: #000000;"> randomArray </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IList </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Nothing</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: #008080;">05</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_139_641_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_139_641_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_139_641_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_139_641_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_139_641_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_139_641_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_139_641_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_139_641_Open_Text').style.display='inline';"/>            </span><span style="color: #0000FF;">Private</span><span style="color: #000000;"> </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_139_641_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Function GetRandomArray()</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_139_641_Open_Text"><span style="color: #0000FF;">Function</span><span style="color: #000000;"> GetRandomArray() </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IList
</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;">If</span><span style="color: #000000;"> randomArray </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;">07</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;"> rand </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> Random </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">New</span><span style="color: #000000;"> Random()
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    randomArray </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">New</span><span style="color: #000000;"> ArrayList()
</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;">Dim</span><span style="color: #000000;"> i </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Integer</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"/>                    </span><span style="color: #0000FF;">For</span><span style="color: #000000;"> i </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800080;">0</span><span style="color: #000000;"> </span><span style="color: #0000FF;">To</span><span style="color: #000000;"> </span><span style="color: #800080;">9</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Step</span><span style="color: #000000;"> i </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #800080;">1</span><span style="color: #000000;">
</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;">Dim</span><span style="color: #000000;"> random </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Integer</span><span style="color: #000000;"> </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">CType</span><span style="color: #000000;">(rand.Next(</span><span style="color: #800080;">10</span><span style="color: #000000;">), </span><span style="color: #0000FF;">Integer</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"/>                        randomArray.Add(random)
</span><span style="color: #008080;">13</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    </span><span style="color: #0000FF;">Next</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"/>                </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;">15</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">Return</span><span style="color: #000000;"> randomArray
</span><span style="color: #008080;">16</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>            </span><span style="color: #0000FF;">End Function</span></span><span style="color: #000000;">
</span><span style="color: #008080;">17</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">18</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_662_883_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_662_883_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_662_883_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_662_883_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_662_883_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_662_883_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_662_883_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_662_883_Open_Text').style.display='inline';"/>            </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_662_883_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Function Match()</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_RandomPredicate_1601_66_662_883_Open_Text"><span style="color: #0000FF;">Function</span><span style="color: #000000;"> Match(</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;">19</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 having points in the values of</span><span style="color: #008000;">
</span><span style="color: #008080;">20</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;"> the randomArray</span><span style="color: #008000;">
</span><span style="color: #008080;">21</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;"> GetRandomArray().Contains(p.Points)
</span><span style="color: #008080;">22</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>            </span><span style="color: #0000FF;">End Function</span></span><span style="color: #000000;">
</span><span style="color: #008080;">23</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>        </span><span style="color: #0000FF;">End Class</span></span></div></pre></div></div>

</span>
<a name="SelectPilotsEven"></a><h2>SelectPilotsEven</h2>
<p>Select pilots with even points.<br></p>



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

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">SimpleExamples.cs: <span class="fscMemberName">SelectPilotsEven</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_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;"> SelectPilotsEven()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_47_765_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_SelectPilotsEven_1806_67_47_765_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_47_765_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_47_765_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_47_765_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_SelectPilotsEven_1806_67_47_765_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_47_765_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_47_765_Open_Text').style.display='inline';"/>        </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_47_765_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_47_765_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_SelectPilotsEven_1806_67_149_755_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_SelectPilotsEven_1806_67_149_755_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_149_755_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_149_755_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_149_755_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_SelectPilotsEven_1806_67_149_755_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_149_755_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_149_755_Open_Text').style.display='inline';"/>            </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_149_755_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_149_755_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_SelectPilotsEven_1806_67_187_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_SelectPilotsEven_1806_67_187_490_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_187_490_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_187_490_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_187_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_SelectPilotsEven_1806_67_187_490_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_187_490_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_187_490_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_187_490_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_187_490_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_SelectPilotsEven_1806_67_296_430_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_SelectPilotsEven_1806_67_296_430_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_296_430_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_296_430_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_296_430_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_SelectPilotsEven_1806_67_296_430_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_296_430_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_296_430_Open_Text').style.display='inline';"/>                    </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_296_430_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_296_430_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 having even points</span><span style="color: #008000;">
</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: #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;">2</span><span style="color: #000000;"> </span><span style="color: #000000;">==</span><span style="color: #000000;"> </span><span style="color: #800080;">0</span><span style="color: #000000;">;
</span><span style="color: #008080;">12</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;">13</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    ListResult(result);
</span><span style="color: #008080;">14</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;">15</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;">16</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_544_644_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_SelectPilotsEven_1806_67_544_644_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_544_644_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_544_644_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_544_644_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_SelectPilotsEven_1806_67_544_644_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_544_644_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_544_644_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_544_644_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_544_644_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">17</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;">18</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;">19</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;">20</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_685_741_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_SelectPilotsEven_1806_67_685_741_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_685_741_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_685_741_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_685_741_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_SelectPilotsEven_1806_67_685_741_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_685_741_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_685_741_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_685_741_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectPilotsEven_1806_67_685_741_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">21</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    CloseDatabase();
</span><span style="color: #008080;">22</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;">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/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">SelectPilotsEven</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsEven_1937_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_SelectPilotsEven_1937_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_SelectPilotsEven_1937_67_15_542_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsEven_1937_67_15_542_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsEven_1937_67_15_542_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsEven_1937_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_SelectPilotsEven_1937_67_15_542_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsEven_1937_67_15_542_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsEven_1937_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_SelectPilotsEven_1937_67_15_542_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub SelectPilotsEven()</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectPilotsEven_1937_67_15_542_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> SelectPilotsEven()
</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;"> PilotsEvenMatch)
</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">PilotsEvenMatch</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_PilotsEvenMatch_2008_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_PilotsEvenMatch_2008_66_15_171_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_PilotsEvenMatch_2008_66_15_171_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_PilotsEvenMatch_2008_66_15_171_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_PilotsEvenMatch_2008_66_15_171_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_PilotsEvenMatch_2008_66_15_171_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_PilotsEvenMatch_2008_66_15_171_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_PilotsEvenMatch_2008_66_15_171_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_PilotsEvenMatch_2008_66_15_171_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_PilotsEvenMatch_2008_66_15_171_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Function PilotsEvenMatch()</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_PilotsEvenMatch_2008_66_15_171_Open_Text"><span style="color: #0000FF;">Function</span><span style="color: #000000;"> PilotsEvenMatch(</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 having even points</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: #0000FF;">Return</span><span style="color: #000000;"> p.Points </span><span style="color: #0000FF;">Mod</span><span style="color: #000000;"> </span><span style="color: #800080;">2</span><span style="color: #000000;"> </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800080;">0</span><span style="color: #000000;">
</span><span style="color: #008080;">4</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="SelectAnyOnePilot"></a><h2>SelectAnyOnePilot</h2>
<p>Select one pilot and quit.&nbsp;</p>



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

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">SimpleExamples.cs: <span class="fscMemberName">SelectAnyOnePilot</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68"><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;"> SelectAnyOnePilot()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_48_619_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_SelectAnyOnePilot_2213_68_48_619_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_48_619_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_48_619_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_48_619_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_SelectAnyOnePilot_2213_68_48_619_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_48_619_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_48_619_Open_Text').style.display='inline';"/>        </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_48_619_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_48_619_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_SelectAnyOnePilot_2213_68_150_609_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_SelectAnyOnePilot_2213_68_150_609_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_150_609_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_150_609_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_150_609_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_SelectAnyOnePilot_2213_68_150_609_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_150_609_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_150_609_Open_Text').style.display='inline';"/>            </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_150_609_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_150_609_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_SelectAnyOnePilot_2213_68_188_344_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_SelectAnyOnePilot_2213_68_188_344_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_188_344_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_188_344_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_188_344_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_SelectAnyOnePilot_2213_68_188_344_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_188_344_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_188_344_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_188_344_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_188_344_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"/>                    IObjectSet result </span><span style="color: #000000;">=</span><span style="color: #000000;"> container.Query(</span><span style="color: #0000FF;">new</span><span style="color: #000000;"> AnyPilotPredicate());
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    SimpleExamples.ListResult(result);
</span><span style="color: #008080;">10</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;">11</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;">12</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_398_498_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_SelectAnyOnePilot_2213_68_398_498_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_398_498_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_398_498_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_398_498_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_SelectAnyOnePilot_2213_68_398_498_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_398_498_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_398_498_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_398_498_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_398_498_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">13</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;">14</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;">15</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;">16</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_539_595_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_SelectAnyOnePilot_2213_68_539_595_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_539_595_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_539_595_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_539_595_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_SelectAnyOnePilot_2213_68_539_595_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_539_595_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_539_595_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_539_595_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAnyOnePilot_2213_68_539_595_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">17</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    CloseDatabase();
</span><span style="color: #008080;">18</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;">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/ExpandedBlockEnd.gif" align="top"/>        }</span></span></div></pre></div></div>

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">SimpleExamples.cs: <span class="fscMemberName">AnyPilotPredicate</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68"><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;">class</span><span style="color: #000000;"> AnyPilotPredicate : Predicate
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_52_521_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_AnyPilotPredicate_2285_68_52_521_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_52_521_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_52_521_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_52_521_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_AnyPilotPredicate_2285_68_52_521_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_52_521_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_52_521_Open_Text').style.display='inline';"/>        </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_52_521_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_52_521_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"/>            </span><span style="color: #0000FF;">bool</span><span style="color: #000000;"> selected </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">false</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: #008080;">05</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">bool</span><span style="color: #000000;"> Match(Pilot pilot)
</span><span style="color: #008080;">06</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_145_511_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_AnyPilotPredicate_2285_68_145_511_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_145_511_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_145_511_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_145_511_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_AnyPilotPredicate_2285_68_145_511_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_145_511_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_145_511_Open_Text').style.display='inline';"/>            </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_145_511_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_145_511_Open_Text"><span style="color: #000000;">{
</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: #008000;">//</span><span style="color: #008000;"> return only first result (first result can
</span><span style="color: #008080;">08</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 any value from the resultset)</span><span style="color: #008000;">
</span><span style="color: #008080;">09</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;">if</span><span style="color: #000000;"> (</span><span style="color: #000000;">!</span><span style="color: #000000;">selected)
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_308_401_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_AnyPilotPredicate_2285_68_308_401_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_308_401_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_308_401_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_308_401_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_AnyPilotPredicate_2285_68_308_401_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_308_401_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_308_401_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_308_401_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_308_401_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">11</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    selected </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">true</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;">return</span><span style="color: #000000;"> selected;
</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"/>                </span><span style="color: #0000FF;">else</span><span style="color: #000000;">
</span><span style="color: #008080;">15</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_439_496_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_AnyPilotPredicate_2285_68_439_496_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_439_496_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_439_496_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_439_496_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_AnyPilotPredicate_2285_68_439_496_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_439_496_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_439_496_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_439_496_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_AnyPilotPredicate_2285_68_439_496_Open_Text"><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;">return</span><span style="color: #000000;"> </span><span style="color: #000000;">!</span><span style="color: #000000;">selected;
</span><span style="color: #008080;">17</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;">18</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</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/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">SelectAnyOnePilot</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectAnyOnePilot_2417_68"><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_SelectAnyOnePilot_2417_68_15_541_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_SelectAnyOnePilot_2417_68_15_541_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectAnyOnePilot_2417_68_15_541_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectAnyOnePilot_2417_68_15_541_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectAnyOnePilot_2417_68_15_541_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_SelectAnyOnePilot_2417_68_15_541_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectAnyOnePilot_2417_68_15_541_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectAnyOnePilot_2417_68_15_541_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_SelectAnyOnePilot_2417_68_15_541_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub SelectAnyOnePilot()</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectAnyOnePilot_2417_68_15_541_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> SelectAnyOnePilot()
</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;"> IObjectSet </span><span style="color: #000000;">=</span><span style="color: #000000;"> container.Query(</span><span style="color: #0000FF;">New</span><span style="color: #000000;"> AnyPilotPredicate())
</span><span style="color: #008080;">06</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    SimpleExamples.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">AnyPilotPredicate</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AnyPilotPredicate_2489_68"><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_AnyPilotPredicate_2489_68_8_535_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_AnyPilotPredicate_2489_68_8_535_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AnyPilotPredicate_2489_68_8_535_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AnyPilotPredicate_2489_68_8_535_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AnyPilotPredicate_2489_68_8_535_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_AnyPilotPredicate_2489_68_8_535_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AnyPilotPredicate_2489_68_8_535_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AnyPilotPredicate_2489_68_8_535_Open_Text').style.display='inline';"/><span style="color: #0000FF;">Private</span><span style="color: #000000;"> </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AnyPilotPredicate_2489_68_8_535_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Class AnyPilotPredicate</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AnyPilotPredicate_2489_68_8_535_Open_Text"><span style="color: #0000FF;">Class</span><span style="color: #000000;"> AnyPilotPredicate
</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;">Inherits</span><span style="color: #000000;"> Query.Predicate
</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;">Dim</span><span style="color: #000000;"> selected </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: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">False</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: #008080;">05</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AnyPilotPredicate_2489_68_133_517_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AnyPilotPredicate_2489_68_133_517_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AnyPilotPredicate_2489_68_133_517_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AnyPilotPredicate_2489_68_133_517_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AnyPilotPredicate_2489_68_133_517_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AnyPilotPredicate_2489_68_133_517_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AnyPilotPredicate_2489_68_133_517_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AnyPilotPredicate_2489_68_133_517_Open_Text').style.display='inline';"/>            </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AnyPilotPredicate_2489_68_133_517_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Function Match()</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AnyPilotPredicate_2489_68_133_517_Open_Text"><span style="color: #0000FF;">Function</span><span style="color: #000000;"> Match(</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;">06</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;"> return only first result (first result can</span><span style="color: #008000;">
</span><span style="color: #008080;">07</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 any value from the resultset)</span><span style="color: #008000;">
</span><span style="color: #008080;">08</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;">If</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Not</span><span style="color: #000000;"> selected </span><span style="color: #0000FF;">Then</span><span style="color: #000000;">
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    selected </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">True</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"/>                    </span><span style="color: #0000FF;">Return</span><span style="color: #000000;"> selected
</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;">Else</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;">Return</span><span style="color: #000000;"> selected </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Not</span><span style="color: #000000;"> selected
</span><span style="color: #008080;">13</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;">14</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>            </span><span style="color: #0000FF;">End Function</span></span><span style="color: #000000;">
</span><span style="color: #008080;">15</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>        </span><span style="color: #0000FF;">End Class</span></span></div></pre></div></div>

</span>

<a name="SelectDistinctPilots"></a><h2>SelectDistinctPilots</h2>This example shows how to select only unique results from
the non-unique contents in the database.



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

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">SimpleExamples.cs: <span class="fscMemberName">StoreDuplicates</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66"><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;"> StoreDuplicates()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_46_1176_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_StoreDuplicates_2757_66_46_1176_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_46_1176_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_46_1176_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_46_1176_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_StoreDuplicates_2757_66_46_1176_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_46_1176_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_46_1176_Open_Text').style.display='inline';"/>        </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_46_1176_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_46_1176_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"/>            File.Delete(Db4oFileName);
</span><span style="color: #008080;">04</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;">05</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;">06</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_187_1166_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_StoreDuplicates_2757_66_187_1166_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_187_1166_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_187_1166_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_187_1166_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_StoreDuplicates_2757_66_187_1166_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_187_1166_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_187_1166_Open_Text').style.display='inline';"/>            </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_187_1166_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_187_1166_Open_Text"><span style="color: #000000;">{
</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;">try</span><span style="color: #000000;">
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_225_745_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_StoreDuplicates_2757_66_225_745_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_225_745_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_225_745_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_225_745_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_StoreDuplicates_2757_66_225_745_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_225_745_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_225_745_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_225_745_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_225_745_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    Pilot pilot;
</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: #0000FF;">for</span><span style="color: #000000;"> (</span><span style="color: #0000FF;">int</span><span style="color: #000000;"> i </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800080;">0</span><span style="color: #000000;">; i </span><span style="color: #000000;">&lt;</span><span style="color: #000000;"> ObjectCount; i</span><span style="color: #000000;">++</span><span style="color: #000000;">)
</span><span style="color: #008080;">11</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_338_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_StoreDuplicates_2757_66_338_473_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_338_473_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_338_473_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_338_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_StoreDuplicates_2757_66_338_473_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_338_473_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_338_473_Open_Text').style.display='inline';"/>                    </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_338_473_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_338_473_Open_Text"><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"/>                        pilot </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> Pilot(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Test Pilot #</span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> i, i);
</span><span style="color: #008080;">13</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                        container.Set(pilot);
</span><span style="color: #008080;">14</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;">15</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    </span><span style="color: #0000FF;">for</span><span style="color: #000000;"> (</span><span style="color: #0000FF;">int</span><span style="color: #000000;"> i </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800080;">0</span><span style="color: #000000;">; i </span><span style="color: #000000;">&lt;</span><span style="color: #000000;"> ObjectCount; i</span><span style="color: #000000;">++</span><span style="color: #000000;">)
</span><span style="color: #008080;">16</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_552_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_StoreDuplicates_2757_66_552_687_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_552_687_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_552_687_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_552_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_StoreDuplicates_2757_66_552_687_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_552_687_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_552_687_Open_Text').style.display='inline';"/>                    </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_552_687_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_552_687_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">17</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                        pilot </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> Pilot(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Test Pilot #</span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> i, i);
</span><span style="color: #008080;">18</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                        container.Set(pilot);
</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"/>                    container.Commit();
</span><span style="color: #008080;">21</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;">22</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;"> (Db4oException ex)
</span><span style="color: #008080;">23</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_803_901_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_StoreDuplicates_2757_66_803_901_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_803_901_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_803_901_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_803_901_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_StoreDuplicates_2757_66_803_901_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_803_901_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_803_901_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_803_901_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_803_901_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">24</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;">Db4o 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;">25</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;">26</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;">27</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_955_1055_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_StoreDuplicates_2757_66_955_1055_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_955_1055_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_955_1055_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_955_1055_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_StoreDuplicates_2757_66_955_1055_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_955_1055_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_955_1055_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_955_1055_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_955_1055_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">28</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;">29</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;">30</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;">31</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_1096_1152_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_StoreDuplicates_2757_66_1096_1152_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_1096_1152_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_1096_1152_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_1096_1152_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_StoreDuplicates_2757_66_1096_1152_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_1096_1152_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_1096_1152_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_1096_1152_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_StoreDuplicates_2757_66_1096_1152_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">32</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    CloseDatabase();
</span><span style="color: #008080;">33</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;">34</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;">35</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>        }</span></span></div></pre></div></div>

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">SimpleExamples.cs: <span class="fscMemberName">SelectDistinctPilots</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_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;"> SelectDistinctPilots()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_51_696_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_SelectDistinctPilots_2827_71_51_696_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_51_696_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_51_696_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_51_696_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_SelectDistinctPilots_2827_71_51_696_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_51_696_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_51_696_Open_Text').style.display='inline';"/>        </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_51_696_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_51_696_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_SelectDistinctPilots_2827_71_153_686_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_SelectDistinctPilots_2827_71_153_686_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_153_686_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_153_686_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_153_686_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_SelectDistinctPilots_2827_71_153_686_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_153_686_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_153_686_Open_Text').style.display='inline';"/>            </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_153_686_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_153_686_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_SelectDistinctPilots_2827_71_191_421_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_SelectDistinctPilots_2827_71_191_421_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_191_421_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_191_421_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_191_421_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_SelectDistinctPilots_2827_71_191_421_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_191_421_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_191_421_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_191_421_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_191_421_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"/>                    DistinctPilotsPredicate predicate </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> DistinctPilotsPredicate();
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    IObjectSet result </span><span style="color: #000000;">=</span><span style="color: #000000;"> container.Query(predicate);
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    ListResult(predicate.uniqueResult);
</span><span style="color: #008080;">11</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;">12</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;">13</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_475_575_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_SelectDistinctPilots_2827_71_475_575_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_475_575_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_475_575_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_475_575_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_SelectDistinctPilots_2827_71_475_575_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_475_575_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_475_575_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_475_575_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_475_575_Open_Text"><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"/>                    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;">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;">finally</span><span style="color: #000000;">
</span><span style="color: #008080;">17</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_616_672_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_SelectDistinctPilots_2827_71_616_672_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_616_672_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_616_672_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_616_672_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_SelectDistinctPilots_2827_71_616_672_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_616_672_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_616_672_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_616_672_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectDistinctPilots_2827_71_616_672_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"/>                    CloseDatabase();
</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/ExpandedSubBlockEnd.gif" align="top"/>            }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">21</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>        }</span></span></div></pre></div></div>

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">SimpleExamples.cs: <span class="fscMemberName">DistinctPilotsPredicate</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_DistinctPilotsPredicate_2902_74"><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;">class</span><span style="color: #000000;"> DistinctPilotsPredicate : Predicate
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_DistinctPilotsPredicate_2902_74_58_367_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_DistinctPilotsPredicate_2902_74_58_367_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_DistinctPilotsPredicate_2902_74_58_367_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_DistinctPilotsPredicate_2902_74_58_367_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_DistinctPilotsPredicate_2902_74_58_367_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_DistinctPilotsPredicate_2902_74_58_367_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_DistinctPilotsPredicate_2902_74_58_367_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_DistinctPilotsPredicate_2902_74_58_367_Open_Text').style.display='inline';"/>        </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_DistinctPilotsPredicate_2902_74_58_367_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_DistinctPilotsPredicate_2902_74_58_367_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"/>            </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> Dictionary</span><span style="color: #000000;">&lt;</span><span style="color: #000000;">Pilot, </span><span style="color: #0000FF;">object</span><span style="color: #000000;">&gt;</span><span style="color: #000000;"> uniqueResult </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> Dictionary</span><span style="color: #000000;">&lt;</span><span style="color: #000000;">Pilot, </span><span style="color: #0000FF;">object</span><span style="color: #000000;">&gt;</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: #008080;">05</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">bool</span><span style="color: #000000;"> Match(Pilot pilot)
</span><span style="color: #008080;">06</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_DistinctPilotsPredicate_2902_74_209_357_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_DistinctPilotsPredicate_2902_74_209_357_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_DistinctPilotsPredicate_2902_74_209_357_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_DistinctPilotsPredicate_2902_74_209_357_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_DistinctPilotsPredicate_2902_74_209_357_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_DistinctPilotsPredicate_2902_74_209_357_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_DistinctPilotsPredicate_2902_74_209_357_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_DistinctPilotsPredicate_2902_74_209_357_Open_Text').style.display='inline';"/>            </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_DistinctPilotsPredicate_2902_74_209_357_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_DistinctPilotsPredicate_2902_74_209_357_Open_Text"><span style="color: #000000;">{
</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: #008000;">//</span><span style="color: #008000;"> each Pilot is included in the result</span><span style="color: #008000;">
</span><span style="color: #008080;">08</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">                uniqueResult.Add(pilot, </span><span style="color: #0000FF;">null</span><span style="color: #000000;">);
</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;">return</span><span style="color: #000000;"> </span><span style="color: #0000FF;">false</span><span style="color: #000000;">;
</span><span style="color: #008080;">10</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;">11</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">StoreDuplicates</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_StoreDuplicates_3040_66"><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_StoreDuplicates_3040_66_15_1108_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_StoreDuplicates_3040_66_15_1108_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_StoreDuplicates_3040_66_15_1108_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_StoreDuplicates_3040_66_15_1108_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_StoreDuplicates_3040_66_15_1108_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_StoreDuplicates_3040_66_15_1108_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_StoreDuplicates_3040_66_15_1108_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_StoreDuplicates_3040_66_15_1108_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_StoreDuplicates_3040_66_15_1108_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub StoreDuplicates()</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_StoreDuplicates_3040_66_15_1108_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> StoreDuplicates()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            File.Delete(Db4oFileName)
</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;">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;">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;"> </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;">05</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;">06</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;"> pilot </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> Pilot
</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;">Dim</span><span style="color: #000000;"> i </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Integer</span><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"/>                    </span><span style="color: #0000FF;">For</span><span style="color: #000000;"> i </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800080;">0</span><span style="color: #000000;"> </span><span style="color: #0000FF;">To</span><span style="color: #000000;"> ObjectCount </span><span style="color: #000000;">-</span><span style="color: #000000;"> </span><span style="color: #800080;">1</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Step</span><span style="color: #000000;"> i </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #800080;">1</span><span style="color: #000000;">
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                        pilot </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">New</span><span style="color: #000000;"> Pilot(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Test Pilot #</span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> i.ToString(), i)
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                        container.Set(pilot)
</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;">Next</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"/>                    i </span><span style="color: #000000;">=</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/InBlock.gif" align="top"/>                    </span><span style="color: #0000FF;">For</span><span style="color: #000000;"> i </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800080;">0</span><span style="color: #000000;"> </span><span style="color: #0000FF;">To</span><span style="color: #000000;"> ObjectCount </span><span style="color: #000000;">-</span><span style="color: #000000;"> </span><span style="color: #800080;">1</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Step</span><span style="color: #000000;"> i </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #800080;">1</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"/>                        pilot </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">New</span><span style="color: #000000;"> Pilot(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Test Pilot #</span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> i.ToString(), i)
</span><span style="color: #008080;">15</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                        container.Set(pilot)
</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;">Next</span><span style="color: #000000;">
</span><span style="color: #008080;">17</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    container.Commit()
</span><span style="color: #008080;">18</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;"> Db4oException
</span><span style="color: #008080;">19</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;">Db4o 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;">20</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;">21</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;">22</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;">23</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    CloseDatabase()
</span><span style="color: #008080;">24</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;">25</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;">26</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">SelectDistinctPilots</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectDistinctPilots_3110_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_SelectDistinctPilots_3110_71_15_624_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_SelectDistinctPilots_3110_71_15_624_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectDistinctPilots_3110_71_15_624_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectDistinctPilots_3110_71_15_624_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectDistinctPilots_3110_71_15_624_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_SelectDistinctPilots_3110_71_15_624_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectDistinctPilots_3110_71_15_624_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectDistinctPilots_3110_71_15_624_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_SelectDistinctPilots_3110_71_15_624_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub SelectDistinctPilots()</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectDistinctPilots_3110_71_15_624_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> SelectDistinctPilots()
</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;"> predicate </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> DistinctPilotsPredicate </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">New</span><span style="color: #000000;"> DistinctPilotsPredicate()
</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;">Dim</span><span style="color: #000000;"> result </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IObjectSet </span><span style="color: #000000;">=</span><span style="color: #000000;"> container.Query(predicate)
</span><span style="color: #008080;">07</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    ListResult(predicate.uniqueResult)
</span><span style="color: #008080;">08</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;">09</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;">10</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;">11</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    CloseDatabase()
</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;">Try</span><span style="color: #000000;">
</span><span style="color: #008080;">13</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;">14</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">DistinctPilotsPredicate</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_DistinctPilotsPredicate_3185_74"><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_DistinctPilotsPredicate_3185_74_8_412_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_DistinctPilotsPredicate_3185_74_8_412_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_DistinctPilotsPredicate_3185_74_8_412_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_DistinctPilotsPredicate_3185_74_8_412_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_DistinctPilotsPredicate_3185_74_8_412_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_DistinctPilotsPredicate_3185_74_8_412_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_DistinctPilotsPredicate_3185_74_8_412_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_DistinctPilotsPredicate_3185_74_8_412_Open_Text').style.display='inline';"/><span style="color: #0000FF;">Private</span><span style="color: #000000;"> </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_DistinctPilotsPredicate_3185_74_8_412_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Class DistinctPilotsPredicate</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_DistinctPilotsPredicate_3185_74_8_412_Open_Text"><span style="color: #0000FF;">Class</span><span style="color: #000000;"> DistinctPilotsPredicate
</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;">Inherits</span><span style="color: #000000;"> Query.Predicate
</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: #008080;">04</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> uniqueResult </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> Dictionary(</span><span style="color: #0000FF;">Of</span><span style="color: #000000;"> Pilot, </span><span style="color: #0000FF;">Object</span><span style="color: #000000;">) </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">New</span><span style="color: #000000;"> Dictionary(</span><span style="color: #0000FF;">Of</span><span style="color: #000000;"> Pilot, </span><span style="color: #0000FF;">Object</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: #008080;">06</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_DistinctPilotsPredicate_3185_74_197_394_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_DistinctPilotsPredicate_3185_74_197_394_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_DistinctPilotsPredicate_3185_74_197_394_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_DistinctPilotsPredicate_3185_74_197_394_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_DistinctPilotsPredicate_3185_74_197_394_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_DistinctPilotsPredicate_3185_74_197_394_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_DistinctPilotsPredicate_3185_74_197_394_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_DistinctPilotsPredicate_3185_74_197_394_Open_Text').style.display='inline';"/>            </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_DistinctPilotsPredicate_3185_74_197_394_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Function Match()</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_DistinctPilotsPredicate_3185_74_197_394_Open_Text"><span style="color: #0000FF;">Function</span><span style="color: #000000;"> Match(</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;">07</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;"> each Pilot is included in the result</span><span style="color: #008000;">
</span><span style="color: #008080;">08</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">                uniqueResult.Add(p, </span><span style="color: #0000FF;">Nothing</span><span style="color: #000000;">)
</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;">Return</span><span style="color: #000000;"> </span><span style="color: #0000FF;">False</span><span style="color: #000000;">
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>            </span><span style="color: #0000FF;">End Function</span></span><span style="color: #000000;">
</span><span style="color: #008080;">11</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>        </span><span style="color: #0000FF;">End Class</span></span></div></pre></div></div>

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