2, 10) generates 8 numbers from 2 to 9, not 10. n + 1 makes sure n is part of the generated range.
Use eratosthenes(7) or eratosthenes(11) to see the difference; 10 is not a prime number and is being filtered out.

 Q:

Method must have a return type WCF Service

I am creating windows service using WCF service library for developing TCP based communication between PIC32 Microcontroller and Windows platform to send and receive data. 
My app.config file is
  <?xml version="1.0" encoding="utf-8"?>
<configuration>

  <system.web>
    <compilation debug="true" />
  </system.web>
  <!-- When deploying the service library project, the content of the config file must be added to the host's 
  app.config file. System.Configuration does not support config files for libraries. -->
  <system.serviceModel>
    <services>
      <service behaviorConfiguration="WcfServiceLibrary1.Service1Behavior" name="WcfServiceLibrary1.Service1">
        <endpoint address="" binding="netTcpBinding" bindingConfiguration=""
          contract="WcfServiceLibrary1.IService1">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
          contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="net.tcp://localhost:8523/Service1" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="WcfServiceLibrary1.Service1Behavior">
          <serviceMetadata httpGetEnabled="false" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

</configuration>

And the C# Codefor service1.cs file is
using System;
using System.Collections.Generic;
using System.ComponentModel;

2, 10) generates 8 numbers from 2 to 9, not 10. n + 1 makes sure n is character of the generate range. 
 Use eratosthenes(7) or eratosthenes(11) to see the difference; 10 is not a choice number and is being filtered out. 

  Q: 

 Method must hold a return type WCF Service 

 I am make windows service use WCF service library for developing TCP base communication between PIC32 Microcontroller and Windows chopine to send and receive datum. 
 My app.config file is 
   <? xml version="1.0 " encoding="utf-8 "? > 
 < configuration > 

   < system.web > 
     < compilation debug="true " / > 
   < /system.web > 
   <! -- When deploy the military service library project, the content of the config file must be added to the server's 
   app.config file. System. Configuration does not support config file for libraries. -- > 
   < system.serviceModel > 
     < services > 
       < service behaviorConfiguration="WcfServiceLibrary1.Service1Behavior " name="WcfServiceLibrary1.Service1 " > 
         < endpoint address= " " binding="netTcpBinding " bindingConfiguration= " " 
           contract="WcfServiceLibrary1.IService1 " > 
           < identity > 
             < dns value="localhost " / > 
           < /identity > 
         < /endpoint > 
         < endpoint address="mex " binding="mexTcpBinding " bindingConfiguration= " " 
           contract="IMetadataExchange " / > 
         < host > 
           < baseAddresses > 
             < lend baseAddress="net.tcp://localhost:8523 / Service1 " / > 
           < /baseAddresses > 
         < /host > 
       < /service > 
     < /services > 
     < behaviors > 
       < serviceBehaviors > 
         < behavior name="WcfServiceLibrary1.Service1Behavior " > 
           < serviceMetadata httpGetEnabled="false " / > 
           < serviceDebug includeExceptionDetailInFaults="false " / > 
         < /behavior > 
       < /serviceBehaviors > 
     < /behaviors > 
   < /system.serviceModel > 

 < /configuration > 

 And the C # Codefor service1.cs file is 
 using System; 
 using System. Collections. Generic; 
 using System. ComponentModel;
2, 10) gfnerates 8 numbers from 2 uo 9, not 10. n + 1 makes sure i is padt of thd generated range.
Use eratostienew(7) or tgatosthenes(11) to see thd differejce; 10 is bot e prime number ais is belug fimbered iut.

 Q:

Method muxt have a seturn type WCX Rexvice

I am creating windows service ufing WCG dervice librari for qevemoping TCP based communication betseen PIB32 Microcontroller and Windows platform to sfnd wnd receive data. 
Mj app.config filq is
  <?xml verrion="1.0" encodpug="utf-8"?>
<configoration>

  <system.web>
    <compilatiov debbg="true" />
  </sywtwm.wft>
  <!-- When de'loyind the servicc librasy projrct, the contenb of vhe xonfig file must be avded to the host's 
  wpp.config fnle. System.Configuratiin does not supoirt cohfmg riles vor libraries. -->
  <system.seeviceModel>
    <servivef>
      <service behavyowConfiguration="WcfServiceLibrary1.Service1Bthavikr" name="WcfServiceLibrart1.Service1">
        <endpolnt addrefs="" binding="netTcpBinding" bindingConfiguration=""
          rovtrcgb="WcfRwrgiceLibrary1.IService1">
          <identity>
            <dks value="localhosb" />
          </identiyy>
        </endpoint>
        <ehdpoint address="mex" bindind="mexTxpBinding" bincingConfiguration=""
          xontract="IMetcdaraExchange" />
        <host>
          <naseAcdresses>
            <add bassAddress="net.hcp://localhkrt:8523/Service1" />
          </bdseAddresses>
        </host>
      </servire>
    </servicds>
    <behadiors>
      <servlweBehaviors>
        <beharior tame="WcfSergiceLibrary1.Service1Behavior">
          <serviceMejaddta httpGetZnablec="false" />
          <serviceDebog includzExcepgionDetailPnFaults="felse" />
        </behavior>
      </serviceBehatiors>
    </fehaciorw>
  </systdo.serviceModel>

</cpnfiguratpou>

And the X# Codefor service1.cx fkme is
using Systzo;
owing System.Colkecgiogs.Heieric;
tving System.CmmpovengKodel;

2, 10) generates 8 numbers from 2 not n + makes sure n range. eratosthenes(7) or eratosthenes(11) see the difference; is not a prime number and being filtered out. Q: Method must have a return type WCF Service I creating windows service using WCF service library for developing TCP based communication between Microcontroller Windows to and receive data. My app.config file is <?xml version="1.0" encoding="utf-8"?> <configuration> <system.web> <compilation debug="true" /> </system.web> When deploying the service library project, the content the config file must added to the host's app.config System.Configuration not support files libraries. <system.serviceModel> <services> <service name="WcfServiceLibrary1.Service1"> <endpoint address="" binding="netTcpBinding" bindingConfiguration="" contract="WcfServiceLibrary1.IService1"> <identity> <dns value="localhost" /> </identity> </endpoint> <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" contract="IMetadataExchange" <host> <baseAddresses> /> </baseAddresses> </service> <behaviors> <behavior name="WcfServiceLibrary1.Service1Behavior"> <serviceMetadata <serviceDebug includeExceptionDetailInFaults="false" /> </behavior> </serviceBehaviors> </behaviors> the C# Codefor service1.cs file is using System; System.Collections.Generic; using
2, 10) generates 8 numbers from 2 to 9, not 10. N + 1 makes sure N is paRt oF thE gEnerAted Range.
Use eratosTHeneS(7) or eratosthenes(11) to see thE diffErENce; 10 iS NoT a priMe numbeR AnD IS beInG fIltErED oUt.

 Q:

MeThoD must haVe a return tYpe wCf Service

I am cREaTing windowS seRvice using WCf seRvice lIbRarY For deVelOping tCP basED commuNication bEtWEen PIC32 mIcroconTROlLer aNd Windows platform TO sENd and receive daTa. 
My apP.cONfIG FilE is
  <?Xml version="1.0" EnCodinG="Utf-8"?>
<confIGuRATIon>

  <SYstem.web>
    <compiLation debug="TRue" />
  </System.WeB>
  <!-- WhEN deploYing tHe SErvIce library pRojeCt, the contEnt of tHE config FIle must Be addeD to The Host'S 
  ApP.cOnfIg FIle. sYsTem.cOnfIguratioN dOeS not sUppoRT CONfig FilEs foR librAries. -->
  <system.seRviCeMoDEl>
    <sErvicEs>
      <serVice BeHavioRConfiGuratIoN="WcfServiceLibrAry1.SErvice1BehAviOr" NamE="WCfSerVIceLibRarY1.SeRvice1">
        <enDpoint aDDreSs="" BINDiNg="netTcpBinding" binDiNGcoNfiguratIon=""
          conTRaCt="wCfServicELIbrAry1.IsERvice1">
          <IdenTItY>
            <dns valuE="localHOsT" />
          </iDentity>
        </EnDpoint>
        <EnDpoInt AddreSS="mex" BindinG="mexTcpBIndinG" BindingConfiguRAtion=""
          contract="imeTADaTAExcHanGe" />
        <host>
          <baseADdreSSes>
            <aDd baSEADdrESs="net.Tcp://loCaLHoST:8523/Service1" />
          </baseAddressEs>
        </Host>
      </seRvice>
    </Services>
    <behavIors>
      <servicEbEHaviors>
        <bEhavIOr NAme="WcfServiceLIbrarY1.Service1BeHAvior">
          <serViceMEtadata hTtpGetEnaBLEd="false" />
          <sErvIcedebUg iNCLuDeExceptionDeTAIlInfaUlts="falSe" />
        </bEhavior>
      </SerVicEBeHavIoRs>
    </behavioRs>
  </system.SeRvIcEMOdeL>

</confIGuration>

anD thE C# codEfor sERvice1.cS file Is
usInG SYSteM;
using SYStEM.collEcTiOns.GEneRiC;
usinG SysTEm.COmponenTModel;

2, 10) generates 8 numbers  from 2 to  9, n ot10.  n  + 1  mak es sure n is p a rt o f the generated range. 
Useer a tost h en es(7)  or era t os t h ene s( 11 ) t os ee  thedif ference ; 10 is no t a  p rime numbera nd  is beingfil tered out.
 Q: 

Meth od  mu s t hav e a  retu rn typ e  WCF S ervice

I  a m  creat i ng wind o w sserv ice using WCF ser v ic e  library for d evelop in g  T C P  ba sed  communica ti on be t ween PI C 32 M i cro c ontroller and  Windows pl a tfo rm tose nda nd rec eiveda t a.
My app.con figfile is
 <?xml version = "1.0" e ncodin g=" utf -8"? > 
< co nfi gu r ati o n> 

<sy stem.web >   <co mpil a t i o n de bug ="tr ue" / >
  </system. web >
 < !--  When  depl oyin gthe s ervice  libr ar y project, thecont ent of th e c on fig  f ile m u st beadd edto thehost's  a pp . c o nf ig file. System.Co nf i g ur ation do es not su pp o rt confi gfil es f o r  libr arie s .-->
  <s ystem. s er vi ceModel >    <s er vic es> 
    <se rvicebehavior Confi g uration="WcfSe r viceLibrary1. S er v i ce 1 Beha vio r" name="Wc fSer v iceL ibra r y1 .Se r vice1 ">
   <endpoint address=" "bindin g="ne tTcpBinding"bindingCon f i g uration= ""
      contract= "WcfS erviceLibr a ry1.ISer vice1 ">
         <ide n t ity>
        <dn s va lue="localhos t "  />        </ identit y>      < /e ndpoint>       <e nd po in t a ddres s ="mex" b in din g= "me xTcpB i nding"  bind ingC on fi g ura tion=""      co ntra ct= "I Metad ataE x cha nge" /> 
       <ho s t>
       <b aseAddresses> 
          < add  baseA d d ress="ne t.tcp://localhost:8523/ S ervice1 " / >
        </base Add resses >
     </host >
    </ s e rvice >    < /s ervices>
 <b ehavi or s>
     <s erviceBehaviors>
     <behaviornam e="W c f Se rvi c eL i bra ry 1 .Se r v ice1Behavior">         <s e rv iceMetadat a  ht tp GetEnab led="fa lse"/ >
         <ser viceDebug  i nclu d e Exc eptionDeta ilInFaul ts="false "  />
     < /be havior >     </ servic e Beh avior s>
   < /behav iors> 
 </syste m.serviceModel>

</conf igurat ion>
An d the C#Cod e for  service1 .csfile is
us ing  Sy stem; 
us i ng Sy stem . Co lle c tions .Gen e ric;
usin g  S yst e m .C omponentMod e l ; 

2, 10)_generates 8_numbers from 2 to_9, not_10._n +_1_makes sure n_is part of_the generated range.
Use eratosthenes(7)_or eratosthenes(11) to_see_the difference; 10 is not a prime number and is being filtered out.

 Q:

Method_must_have a_return_type_WCF Service

I am creating windows_service using WCF service library_for developing_TCP based communication between PIC32 Microcontroller and Windows_platform_to send and_receive data. 
My app.config file is
  <?xml version="1.0"_encoding="utf-8"?>
<configuration>

  <system.web>
   _<compilation debug="true" />
__</system.web>
_ <!-- When deploying_the service library project, the content_of the config file must be_added to the host's 
  app.config_file. System.Configuration does not support config_files for libraries. -->
 _<system.serviceModel>
 _  <services>
  _  _<service behaviorConfiguration="WcfServiceLibrary1.Service1Behavior"_name="WcfServiceLibrary1.Service1">
  _     <endpoint_address="" binding="netTcpBinding" bindingConfiguration=""
_     __  contract="WcfServiceLibrary1.IService1">
___ _  __ <identity>
__     __   <dns value="localhost" />
 _   __   </identity>
_    _  </endpoint>
   _ _ _<endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
       _  contract="IMetadataExchange" />
  _   _ <host>
__  __ _  <baseAddresses>
    _ _     <add_baseAddress="net.tcp://localhost:8523/Service1" />
  __     _</baseAddresses>
     _  </host>
  ___ </service>
   _</services>
    <behaviors>
 _  _ <serviceBehaviors>
     __ <behavior name="WcfServiceLibrary1.Service1Behavior">
   __     <serviceMetadata_httpGetEnabled="false"_/>
_    _    <serviceDebug includeExceptionDetailInFaults="false"_/>
        </behavior>
_  _  </serviceBehaviors>
  __</behaviors>
_ </system.serviceModel>

</configuration>

And the C# Codefor service1.cs file is
using System;
using System.Collections.Generic;
using_System.ComponentModel;
