Sophie

Sophie

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

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

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

<p>For languages with generics support (Java5-6; .NET2.0-3.0):</p>



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

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">SimpleExamples.cs: <span class="fscMemberName">SelectAllPilots</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_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;"> SelectAllPilots()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_46_754_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_SelectAllPilots_324_66_46_754_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_46_754_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_46_754_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_46_754_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_SelectAllPilots_324_66_46_754_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_46_754_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_46_754_Open_Text').style.display='inline';"/>        </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_46_754_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_46_754_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_SelectAllPilots_324_66_148_744_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_SelectAllPilots_324_66_148_744_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_148_744_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_148_744_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_148_744_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_SelectAllPilots_324_66_148_744_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_148_744_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_148_744_Open_Text').style.display='inline';"/>            </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_148_744_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_148_744_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_SelectAllPilots_324_66_186_479_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_SelectAllPilots_324_66_186_479_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_186_479_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_186_479_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_186_479_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_SelectAllPilots_324_66_186_479_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_186_479_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_186_479_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_186_479_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_186_479_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_SelectAllPilots_324_66_295_419_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_SelectAllPilots_324_66_295_419_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_295_419_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_295_419_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_295_419_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_SelectAllPilots_324_66_295_419_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_295_419_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_295_419_Open_Text').style.display='inline';"/>                    </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_295_419_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_295_419_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;"> each Pilot is included in the result</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;"> </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/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_SelectAllPilots_324_66_533_633_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_SelectAllPilots_324_66_533_633_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_533_633_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_533_633_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_533_633_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_SelectAllPilots_324_66_533_633_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_533_633_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_533_633_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_533_633_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_533_633_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_SelectAllPilots_324_66_674_730_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_SelectAllPilots_324_66_674_730_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_674_730_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_674_730_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_674_730_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_SelectAllPilots_324_66_674_730_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_674_730_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_674_730_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_674_730_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilots_324_66_674_730_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">SelectAllPilots</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectAllPilots_454_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_SelectAllPilots_454_66_15_540_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_SelectAllPilots_454_66_15_540_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectAllPilots_454_66_15_540_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectAllPilots_454_66_15_540_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectAllPilots_454_66_15_540_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_SelectAllPilots_454_66_15_540_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectAllPilots_454_66_15_540_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectAllPilots_454_66_15_540_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_SelectAllPilots_454_66_15_540_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub SelectAllPilots()</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectAllPilots_454_66_15_540_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> SelectAllPilots()
</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;"> AllPilotsMatch)
</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">AllPilotsMatch</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AllPilotsMatch_524_65"><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_AllPilotsMatch_524_65_15_163_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_AllPilotsMatch_524_65_15_163_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AllPilotsMatch_524_65_15_163_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AllPilotsMatch_524_65_15_163_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AllPilotsMatch_524_65_15_163_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_AllPilotsMatch_524_65_15_163_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AllPilotsMatch_524_65_15_163_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AllPilotsMatch_524_65_15_163_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_AllPilotsMatch_524_65_15_163_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Function AllPilotsMatch()</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_AllPilotsMatch_524_65_15_163_Open_Text"><span style="color: #0000FF;">Function</span><span style="color: #000000;"> AllPilotsMatch(</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;"> each Pilot is included in the result</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;"> </span><span style="color: #0000FF;">True</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="SelectAllPilotsNonGeneric"></a><h2>SelectAllPilotsNonGeneric</h2>

<p>For languages without generics support (Java1.1-1.4;
.NET1.0):</p>



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

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">SimpleExamples.cs: <span class="fscMemberName">SelectAllPilotsNonGeneric</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76"><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;"> SelectAllPilotsNonGeneric()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_56_614_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_SelectAllPilotsNonGeneric_765_76_56_614_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_56_614_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_56_614_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_56_614_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_SelectAllPilotsNonGeneric_765_76_56_614_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_56_614_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_56_614_Open_Text').style.display='inline';"/>        </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_56_614_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_56_614_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_SelectAllPilotsNonGeneric_765_76_158_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_SelectAllPilotsNonGeneric_765_76_158_604_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_158_604_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_158_604_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_158_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_SelectAllPilotsNonGeneric_765_76_158_604_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_158_604_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_158_604_Open_Text').style.display='inline';"/>            </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_158_604_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_158_604_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_SelectAllPilotsNonGeneric_765_76_196_339_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_SelectAllPilotsNonGeneric_765_76_196_339_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_196_339_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_196_339_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_196_339_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_SelectAllPilotsNonGeneric_765_76_196_339_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_196_339_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_196_339_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_196_339_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_196_339_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;"> NonGenericPredicate());
</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_SelectAllPilotsNonGeneric_765_76_393_493_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_SelectAllPilotsNonGeneric_765_76_393_493_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_393_493_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_393_493_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_393_493_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_SelectAllPilotsNonGeneric_765_76_393_493_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_393_493_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_393_493_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_393_493_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_393_493_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_SelectAllPilotsNonGeneric_765_76_534_590_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_SelectAllPilotsNonGeneric_765_76_534_590_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_534_590_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_534_590_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_534_590_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_SelectAllPilotsNonGeneric_765_76_534_590_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_534_590_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_534_590_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_534_590_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_SelectAllPilotsNonGeneric_765_76_534_590_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">NonGenericPredicate</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_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;"> NonGenericPredicate : Predicate
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_66_54_324_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_NonGenericPredicate_841_66_54_324_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_66_54_324_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_66_54_324_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_66_54_324_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_NonGenericPredicate_841_66_54_324_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_66_54_324_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_66_54_324_Open_Text').style.display='inline';"/>        </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_66_54_324_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_66_54_324_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;"> </span><span style="color: #0000FF;">bool</span><span style="color: #000000;"> Match(</span><span style="color: #0000FF;">object</span><span style="color: #000000;"> obj)
</span><span style="color: #008080;">04</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_66_110_314_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_NonGenericPredicate_841_66_110_314_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_66_110_314_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_66_110_314_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_66_110_314_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_NonGenericPredicate_841_66_110_314_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_66_110_314_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_66_110_314_Open_Text').style.display='inline';"/>            </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_66_110_314_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_66_110_314_Open_Text"><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: #008000;">//</span><span style="color: #008000;"> each Pilot is included in the result</span><span style="color: #008000;">
</span><span style="color: #008080;">06</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;"> (obj </span><span style="color: #0000FF;">is</span><span style="color: #000000;"> Pilot)
</span><span style="color: #008080;">07</span><span style="color: #000000;"><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_66_218_270_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_NonGenericPredicate_841_66_218_270_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_66_218_270_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_66_218_270_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_66_218_270_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_NonGenericPredicate_841_66_218_270_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_66_218_270_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_66_218_270_Open_Text').style.display='inline';"/>                </span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_66_218_270_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionCS.ZipsSimpleExamples.Cs_SimpleExamples.Cs_NonGenericPredicate_841_66_218_270_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"/>                    </span><span style="color: #0000FF;">return</span><span style="color: #000000;"> </span><span style="color: #0000FF;">true</span><span style="color: #000000;">;
</span><span style="color: #008080;">09</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;">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;"> </span><span style="color: #0000FF;">false</span><span style="color: #000000;">;
</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/ExpandedBlockEnd.gif" align="top"/>        }</span></span></div></pre></div></div> <br></p>

</span>

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

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">SimpleExamples.vb: <span class="fscMemberName">SelectAllPilotsNonGeneric</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectAllPilotsNonGeneric_980_76"><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_SelectAllPilotsNonGeneric_980_76_15_536_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_SelectAllPilotsNonGeneric_980_76_15_536_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectAllPilotsNonGeneric_980_76_15_536_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectAllPilotsNonGeneric_980_76_15_536_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectAllPilotsNonGeneric_980_76_15_536_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_SelectAllPilotsNonGeneric_980_76_15_536_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectAllPilotsNonGeneric_980_76_15_536_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectAllPilotsNonGeneric_980_76_15_536_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_SelectAllPilotsNonGeneric_980_76_15_536_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub SelectAllPilotsNonGeneric()</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_SelectAllPilotsNonGeneric_980_76_15_536_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> SelectAllPilotsNonGeneric()
</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;"> NonGenericPredicate())
</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">NonGenericPredicate</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_NonGenericPredicate_1060_70"><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_NonGenericPredicate_1060_70_8_362_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_NonGenericPredicate_1060_70_8_362_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_NonGenericPredicate_1060_70_8_362_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_NonGenericPredicate_1060_70_8_362_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_NonGenericPredicate_1060_70_8_362_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_NonGenericPredicate_1060_70_8_362_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_NonGenericPredicate_1060_70_8_362_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_NonGenericPredicate_1060_70_8_362_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_NonGenericPredicate_1060_70_8_362_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Class NonGenericPredicate</span><span id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_NonGenericPredicate_1060_70_8_362_Open_Text"><span style="color: #0000FF;">Class</span><span style="color: #000000;"> NonGenericPredicate
</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 id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_NonGenericPredicate_1060_70_90_344_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_NonGenericPredicate_1060_70_90_344_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_NonGenericPredicate_1060_70_90_344_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_NonGenericPredicate_1060_70_90_344_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_NonGenericPredicate_1060_70_90_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_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_NonGenericPredicate_1060_70_90_344_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_NonGenericPredicate_1060_70_90_344_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceImplementation_StrategiesNative_Query_CollectionnqcollectionVB.ZipsSimpleExamples.Vb_SimpleExamples.Vb_NonGenericPredicate_1060_70_90_344_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_NonGenericPredicate_1060_70_90_344_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_NonGenericPredicate_1060_70_90_344_Open_Text"><span style="color: #0000FF;">Function</span><span style="color: #000000;"> Match(</span><span style="color: #0000FF;">ByVal</span><span style="color: #000000;"> obj </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Object</span><span style="color: #000000;">) </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;">04</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;">05</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;">TypeOf</span><span style="color: #000000;"> obj </span><span style="color: #0000FF;">Is</span><span style="color: #000000;"> Pilot </span><span style="color: #0000FF;">Then</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;">Return</span><span style="color: #000000;"> </span><span style="color: #0000FF;">True</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;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">If</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;">Return</span><span style="color: #000000;"> </span><span style="color: #0000FF;">False</span><span style="color: #000000;">
</span><span style="color: #008080;">09</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;">10</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 (3) was last Modified 2007-04-23T19:28:12 by Tetyana.
				</div>
  </body>
</html>