SpecialCharacters#(hashcharacter),151&(AND)operation,457&&(AND)operator,110*(multiplication)operators,455||(OR)operator,110~(bitwisecomplement),456++operator,462(anglebrackets),236/(division)operators,455-(subtraction)operators,455Aabexpression,110a>=bexpression,110!
aexpression,110avariable,456Abort()method,365abstractidentifier,284abstractkeywords,141,147,158,160–162,192abstractinginstantiations,withfactories,180–181abstraction,395AcquireReaderLock()method,376AcquireWriterLock()method,376actionmethod,121actionobjects,separatingfromdataobjects,288–289ActiveCurrencyTraderclass,149,154–156addingconstructorto,154addingconversionmethodsto,155–156defininginformationalread-onlyproperties,155ActiveCurrencyTradermethod,160ActiveXDataObject(ADO),393Add()method,45,49,233writing,34–36writingcodetotestaddingtestprojects,38testingadditionoftwolargenumbers,40–41testingsimpleaddition,39–40identifier,338additionoperator,455–456AddNumbersmethod,468AddPercentage()method,448AddRange()method,253AddRoomGrouping()method,216AddRoomToGrouping()method,221AddValue()method,288ADO(ActiveXDataObject),393ADO.
NET,accessingrelationaldatabasesusing,403–407addingtabledata,403–405closingconnections,407connecting,403deletingdatafrom,406–407selectingdatafromtables,406AI(artificialintelligence)system,77algorithms,77,250–252allotest,66alloappendtest,66AmericanStandardCodeforInformationInterchange(ASCII),68_amountdatamember,182AND(&)operation,457AND(&&)operator,110anglebrackets(),236anonymousdelegates,245–246anonymoustypes,430–431anonymousvariable,247AnotherObjectThatEmbedsSomeObjecttype,440API(applicationprogramminginterface),61App.
configfiles,337Append()method,291applicationdevelopment.
Seedevelopment,softwareapplicationmode,117applicationprogramminginterface(API),61appSettingsfolder,338AppSettingsproperty,339section,338–339,347,357Architecturalcode,140AreYouPreHeated()method,146ArgumentException()method,120ArgumentNullExceptiontype,129ArgumentOutOfRangeExceptiontype,129arithmeticoperators,455–459addition,455–456bitwise,456–458decrement,458–459Index471increment,458–459modulus,458ArithmeticExceptiontype,129ArrayListclass,232arrays,206–207artificialintelligence(AI)system,77ASCII(AmericanStandardCodeforInformationInterchange),68assembliesdynamicloadingof,339–347dynamicallyinstantiatingtypes,339–343enhancingconfigurationfiles,343–347dynamicloadingofstronglynamed,348–354relocatingtoGAC,349–351usingversionnumbers,351–354signing,334versioning,352–353assemblyBindingconfigurationfile,354AssemblyFileVersionattribute,352assemblyIdentitychildelement,354AssemblyInfo.
csfile,348,352Assembly.
Load()method,349AssemblyVersionattribute,352Assert.
AreEquals()method,71AssignCellState()method,320,322AssumeReferenceTypeinterface,466asynchronoustechniques,384AsyncStatedatamember,385AsyncWaitHandle.
WaitOne()method,385attributes,284Attributesdatamember,457availableTypesdictionarycollection,347BbackToDerivedvariable,197baseclasses,140–141,153,177–181abstractinginstantiationswithfactories,180–181overridingforspecializedfunctionality,178–180basefunctionality,185–190base.
CalculateTaxToPay()method,179BaseGeneratedclass,468BaseLinkedListclass,208–210Base.
Method()method,196BaseTaxEngineclass,185BaseTaxEngineinterface,180BaseTaxEngine.
CalculateTaxToPay()method,179BaseTypeparameter,310BaseTypereferences,304BaseTypetype,320–321Beckman,Brian,442BeginRead()method,385Behavioralfunctional,176binarystreams,280,285–287,294Binary2Textapplication,257Binary2Text.
execommand,279BinaryFormatterclass,286bindingRedirectchildelement,354bitwisecomplement(~),456bitwiseoperators,456–458blackboxcontext,295boolproperties,205,302boolreturntypedelegatesignature,248Bootstrapclass,294bootstrapcode,261Bootstrap.
Process()method,263boxing,198,235BreadthFirstSearchclass,100breakstatement,463bruteforce,80bufferparameter,133buffer.
Trim()method,63Buildtab,335Builderclass,318Builder.
BuildWhatAmI()method,319Buttoncontrol,9button_Clickfunction,10CC#3.
0,439–470functionalprogramming,439–453functionevaluation,450–452higher-orderfunctions,442–445purefunctions,445–449recursion,452–453gotostatement,462–463.
NETgenericsconstraints,463–466class,465–466new,465type,463–465nullabletypes,466–468operators,455–462arithmetic,455–459overloading,460–462overview,439partialclasses,468–470partialmethods,468–470Calculate()method,326–327,444CalculateArea()method,170_calculatedTaxabledatamember,178CalculateGrandTotal()method,448CalculateTaxToPay()method,178calculatingaverages,324–327calculatorapplicationAdd()method,34–41developmentoffocusing,30–32organizing,28–30finishing,49numbers,computerunderstandingof,42–44INDEX472Calculatorclasslibrary,32,38,40,43Calculator.
csfile,34CallStackpane,117CallMethodmethod,462CallRuntimeImplementationclasslibrary,332CallRuntimeImplementationproject,334CallRuntimeImplementation.
exe.
configconfigurationfile,336Canadiantaxes,185CanContinue()method,110CanContinueSearch()method,109,111catchblock,120–121,125,127–128,135catchkeyword,120catchstatement,128catchingexceptions,118–120cbvariable,243CellFactoriesclass,251Cellsdatamember,251,316CellStatedatamember,316charactermapping,67–68character-by-charactercomparison,61–62characters=>,249CIL(CommonIntermediateLanguage),23Citynameattribute,88classconstraint,465–466classlibraries,32–44Add()methodwriting,34writingcodetotest,37–41numbers,computerunderstandingof,42–44classlibraryproject,17–23addingtosolutions,17–18callingfunctionality,19–20definingreferences,19movingfunctionality,18variables,21–23Class1.
csfile,14,55classes,33,200declaring,81definingNodeelementsbyswitchingto,94–96ClassWithNoSideEffectsvariable,447ClassWithoutSideEffectsconstructor,451ClassWithSideEffectsvariable,447Clear()method,308CLI(CommonLanguageInfrastructure),44cloning,synchronizingbetweenthreadswith,371–372CLR(commonlanguageruntime),24CLRnumerictypes,45–49clsvariable,169cls.
GetDepth()method,131cls.
Method()method,169cmdtype,16cmd.
Connectionproperty,404ColCellsdatamember,316collectiontypes,252–254key/valuepairlists,253–254plain-vanillalists,252–253Queuelists,254Stacklists,254collections,231–255collectiontypes,252–254key/valuepairlists,253–254plain-vanillalists,252–253Queuelists,254Stacklists,254delegates,240–247anonymous,245–246declaring,242–243extensionmethods,242–243implementing,243–245multicastingwith,246–247lambdaexpressions,247–252creatingalgorithms,250implementingalgorithmsusing,250–252pre-C#2.
0stylemanagementof,231–237example,232–234mixedtypes,234valuetypes,235–236storingusinglinkedlists,206–208comments,addingtoWindowsapplicationproject,12–13CommonIntermediateLanguage(CIL),23CommonLanguageInfrastructure(CLI),44commonlanguageruntime(CLR),24CommonTypeSystem(CTS),25Compare()link,62CompareTo()method,55,56,57,61,65,67ComplexIncrementmethod,462ComplexTypeimmutabletype,460component-orientedarchitecture,199–229kernels,199–200lightingapplicationbuildingkernels,201–223definingrooms,224–225organizing,200–201PrivateRoomimplementations,225–226PublicRoomimplementation,225–226objectinitializationwithnesteddatatypes,227–228privateclasses,227components,32,50,173–175,197concretizing,297conditionalstatements,150–151.
configextension,336element,344,346configurationarchitecture,decouplingusing,331INDEX473Finditfasterathttp://superindex.
apress.
com/configurationfiles,336–339addingassemblyredirectionto,353–354addingdynamicloadingitems,338enhancing,343–347marshalingdata,344–346reading,346–347reading,338–339XML-based,336–337configurationidentifier,337ConfigurationExceptionfailure,135ConfigurationInfoclass,339ConfigurationLoaderclass,339,341,342ConfigurationLoader()method,342ConfigurationLoader.
Instancestaticproperty,342ConfigurationManagerclass,339,341ConfigurationPropertyproperty,344–345ConfigurationPropertyOptions.
IsRequiredparameter,345ConfigurationSectionclass,345connectingtorelationaldatabases,403connectionvariable,403Connectionsarray,93Connectionsattribute,88Connectionsdatamember,90,92Connectionsdefinitions,111Connectionsstring,90consoleapplication,4consoleapplicationproject,16–17addingtosolutions,16"hello,world",16running,17settingstartupproject,17consoletestingapplication,166consoles,pipingdata,258–278buildingshells,260–269readingdata,258–260TextProcessorapplication,270–278Console.
WriteLine()method,20,317,322constkeyword,22constants,21–23constructors,91addingtoActiveCurrencyTraderclass,154addingtoHotelCurrencyTraderclass,156–157Containerclass,296Contains()method,277convention-basedarchitecturedecouplingusing,331implementing,354–356conversionmethodsaddingtoActiveCurrencyTraderclass,155–156addingtoHotelCurrencyTraderclass,157–158ConvertFrom()method,156–157,161convertingbinarystreamsintotextstreams,285–287textstreamsintobinarystreams,284–285ConvertTo()method,156–157,161ConvertToTextField()method,162ConvertValue()method,153,155ConvertValueInverse()method,153,155–156Coordinatesattribute,88copyingdata,effectsof,82–84Count()method,323countvariable,459Counter()method,452countryvariable,445CreateCapitalGain()method,189CreateDeduction()method,178CreateIncome()method,178CreateInstance()method,341CreatePrivateRoom()method,226CreatePublicRoom()method,226CreateSurtaxTaxEngine()method,181CreateTaxAccount()method,178,185,188–189CreatingBuilding()method,226cross-referencing,331CTS(CommonTypeSystem),25CultureInfoinstance,73cultures,69–74numbers,70–72settinginWindows,69–70curlybrackets,82,120currencyconverters,158ActiveCurrencyTraderclass,154–156addingconstructorsto,154addingconversionmethodsto,155–156defininginformationalread-onlyproperties,155HotelCurrencyTraderclass,156–158addingconstructorsto,156–157addingconversionmethodsto,157–158currencyexchangeapplicationorganizing,139writingtestsfor,139–153baseclasses,140–141,153C#properties,143–146inheritance,141–143,147–148scopemodifiers,148–150structuralcode,140verification,150–153currencyspreads,138–139CurrencyTraderclass,141,144,147–148,161CurrencyTraderlibrarycomponent,139CurrencyTrader.
_exchangeRatedatamember,149CurrencyTrader.
ConvertValue()method,156CurrencyTrader.
ConvertValueInverse()method,156CurrentCultureproperty,74INDEX474currExchangeparameter,154curriedFunctionvariable,444CurrVersionvariable,327curryexpression,444currying,442customoptimization,25custom-definedtypesdeclaringstructs/classes,81objects,58–61valuetypeconstraints,81–87DDAO(DataAccessObject),393DataAccessObject(DAO),393dataclass,339datamembersdeclaringasnonserializable,288static,96–99dataobjects,separatingfromactionobjects,288–289datasource,configuring,396–399datastreamsfixing,275–278duplicatedates,277–278emptyfields,277emptylinesoftext,276–277incorrectdataformat,277toomanyfields,277implementingreading/writing,265–269reading/writingto,261–265datastructure,89–99Nodeelementsinitializing,91–92instantiating,91–92switchingtoclassestodefine,94–96referencingusingvaluetypes,92–94staticdatamembers,96–99staticmethods,96–99datatypes.
Seecustom-definedtypes;number-relatedtypes;stringtypesdatabasenormalization,391databaserelations,391–393DatabaseConsoleExconsoleproject,395DatasetDesigner,408–413buildingrelationsbetweentables,408–412generatedcode,412–413datasetvariable,413dataset.
drawsdatamember,413datetimetype,401DateTime.
Parse()method,73DbTypeproperty,IDbDataParametertype,405deadlocks,372–376,386Debugboolproperty,302Debugflag,303Debuginterface,302–303debugmode,117,160debuggerfeature,116–117debuggers,214decoupling,99,331decrementoperator,458–459#definehashcode,159Definitionsassembly,223Definitionsclasslibrary,332DelegateImplementationsclass,244delegates,240–247anonymous,245–246declaring,242–243extensionmethods,242–243implementing,243–245multicastingwith,246–247deletingdatafromrelationaldatabases,406–407dependencies,168dependentAssemblyelement,354depthdatamember,126depth-firstsearchalgorithm,77–81organizing,87–88writingcode,89–112datastructure,89–99definingtest,99–103implementing,103–111running,111–112DepthFirstFindRoute()method,100DepthFirstSearch().
_rootdatamember,104DepthFirstSearchclass,100DepthFirstSearch()method,100,103,105Derived1.
Method()method,196Descriptiondatamember,216Deserialize()method,286designpattern,141deterministiccode,374development,softwarefocusing,30–32organizing,28–30,53–54Devspace.
Trader.
Commonclasslibrary,301–302Dictionary_availableTypesinstanceconstructor,342Dictionaryclass,253Dictionarydatamember,340Dimension()method,305,325DimLight()method,204DisplayHelp()method,268DisplayMessageText()method,22DivideByZeroExceptiontype,129division(/)operators,455DoAdd()method,251,300DoIt()method,355DoMultiply()method,251DoRunningTotalAndMaximum()method,245DoSomething()method,446doubletypes,44,47,49,81,303,320INDEX475Finditfasterathttp://superindex.
apress.
com/doublevalue,325Double.
Parse()method,320downcast,169DowngradeFromWriterLock()method,376downloadingVisualC#Express,2–3drawstable,401drawsTableAdapterinterface,413dynamicloading,329–358ofassemblies,339–347dynamicallyinstantiatingtypes,339–343enhancingconfigurationfiles,343–347ofbaseclasses,356–357configurationarchitecture,329–331configurationfiles,336–339addingdynamicloadingitems,338reading,338–339XML-based,336–337conventionarchitecture,331convention-basedarchitecture,implementing,354–356ofinterfacetypes,356–357settingupprojects,332–335settingoutputpaths,335signingassemblies,334ofstronglynamedassemblies,348–354relocatingtoGAC,349–351usingversionnumbers,351–354dynamicallyinstantiatingtypes,339usinginstantiatedtypes,342–343usingsingletons,341–342Eeasynameattribute,344EasyNameproperty,345echoprograms,260–261elementscollection,367elementsvariable,237#elifhashcode,159#elsehashcode,159elseifstatement,108elsestatement,108EmbeddedMyTypetype,228endparameter,104#endifblock,151#endifhashcode,159[endingcondition]loop,106#endregionhashcode,159EngineCreatorclass,181EngineCreator.
CreateSurtaxTaxEngine()method,181EnglishNameproperty,73Enqueue()method,383Enter()method,376enumerators,iteratingdatausing,323–324Equals()method,58,60,278,289,292–293errors,116,134–135.
SeealsoexceptionsExampleclass,468Example3.
Class1.
HelloWorld()method,20ExampleImplementationinterface,169ExampleImplementation.
Method()method,169ExampleMgrcode,464ExampleStructurestructure,467Exception()constructor,122exceptionhandlers,117–130catchingexceptions,118–120filteringexceptions,128–130implementing,120–123stackunwinding,124–128finallykeyword,126–127sandboxingcode,127–128Exceptiontype,128–129exceptions,115–136.
Seealsoexceptionhandlerscatching,118–120debuggerfeature,116–117exception-safecode,130–135defaultstate,133–134defensivecoding,130–133processingwarningerrors,134–135filtering,128–130overview,115–116stackunwinding,124–128finallykeyword,126–127sandboxingcode,127–128_exchangeRatedatamember,144ExchangeRateproperty,144,147–148,153exclusivelocks,369–371Execute()method,250,299ExecuteNonQuery()method,405–406ExecuteReader()method,406Exit()method,376explorerapplication,360explorer.
exefile,360expressionvariable,442ExtensibleMarkupLanguage(XML),336extensionmethods,242–243,449Extensionsclass,242externalexpression,449Ffactories,181,197abstractinginstantiationswith,180instantiations,181FIFO(firstin,firstout)mechanism,232Fill()method,410filteringexceptions,128–130finallyblock,135finallyhandler,128finallykeyword,120,126–127FindNextLeg()method,105–106,110INDEX476FindRoomGrouping()method,218FindRoute()method,100–101,103–104FirstElementsubelement,337firstin,firstout(FIFO)mechanism,232fixed-dimensionarrays,299floattype,47floating-point,46forloops,77,103,105–106,453forcedtypecast,196foreachkeyword,219–220,222foreachloop,234,236,238,250,413foreachstatement,233–234foreignexchange,138Form1.
Form1file,14Form1_Load()method,382Form1.
csfile,9Form1.
Designer.
csfile,14Form1.
resxfile,14FormatExceptiontype,129Form.
Invoke()method,381FoundRoutedatamember,101–103foundRoutevariable,101foundRoute1variable,102foundRoute2variable,102fromCurrencyparameter,154_fromCurrencyproperty,155Functype,316functionevaluation,441,450–452functionalprogramming,439–453functionevaluation,450–452higher-orderfunctions,442–445purefunctions,445–449recursion,452–453functionalityclasslibraryproject,18–20specialized,178–180GGAC,relocatingstronglynamedassembliesto,349–351gacutiltool,351,353garbagecollection,25GenerateOutput.
Write()method,303genericproducer/consumerarchitecture,382–384GenericsContainerparameter,297–298GenericTypeparameter,309getcodeblock,144getproperty,160GetCellState()method,326GetData()method,410GetDepth()method,131GetEnumerator()method,323GetHashCode()method,58,60,289–292GetMeADelegate()method,244GetMeAValue()method,445,447,451GetNNN()method,406GetObjectData()method,288GetSheet()method,310GetTaxRate()method,186GetType()method,58,60globallyuniqueidentifier(GUID),392gotokeyword,470gotostatement,462–463graphicaluserinterfaces(GUIs),13,380GUID(globallyuniqueidentifier),392GUIs(graphicaluserinterfaces),13,380Hhandlingexceptions.
Seeexceptionhandlershashcharacter(#),151HashTableclass,232Hejlsberg,Anders,439"hello,world"application,9–11,16HelloWorld()method,18Herculeantask,29hiddenproducer/consumerarchitecture,380–381higher-orderfunctions,442–445HotelCurrencyTraderclass,156–158addingconstructorto,156–157addingconversionmethodsto,157–158HotelCurrencyTradermethod,160IIAsyncResulttype,385IAsyncResult.
AsyncStatedatamember,385IBaseinterface,465ICalculateinterface,444ICanadaTaxEngineinterface,188ICell.
Execute()method,250ICollectioninterface,232IDataParametertype,404IDataReaderinterface,406IDbCommandinstance,404IDbCommandinterface,407IDbConnectioninterface,407IDbDataParametertype,404IDE(integrateddevelopmentenvironment),1,57IDebuginterface,302,316IDefinitioninterface,355IDefinitiontype,343IDefinitionsinterface,332Identifierproperty,307IDictionaryinterface,232,253IEnumerableinterface,323IEnumerableinterface,323IEnumerable.
GetEnumerator()method,324IEnumeratorsubclass,324IExampleconstraint,463INDEX477Finditfasterathttp://superindex.
apress.
com/IExampleinterface,169#ifblock,151ifcodeblock,107#ifhashcode,159ifkeyword,151ifstatement,37,77,106–110,323IListinterface,232,235,252immutableobjects,446immutabletypes,274,446–449imperativeprogramming,439Impl1identifier,338,343implementationcode,116Implementation.
Method()method,192Implementationsassembly,223,330Implementations1classlibrary,332Implementations1.
dllassembly,341Implementations1.
Implementationprivateclass,341Implementations1.
Implementationtype,343Implementations2classlibrary,332Implementations2.
dllassembly,348incomesplitting,166incrementoperator,458–459IncrementCounter()method,381indexers,217,220IndexOutOfRangeExceptiontype,130inheritance,141–143,147–148,170–173,190–196,204Initialize()method,446,448InitializeExchangeRate()method,150INoRemoteControlRoominterface,202,203–204INSERTcommand,403,411Insert()method,209,413INSERTstatement,405,407insertingitemsintolinkedlists,209–210InsertRange()method,253Instproperty,464installingVisualC#Express,3–4Instanceproperty,342InstanceInstantiate()method,244InstanceProcess()method,244Instantiate()method,340instantiatingabstractingwithfactories,180–181Nodeelements,91–92PrivateRoomimplementation,225–226PublicRoomimplementation,225–226types,usinginstantiatedtypes,342–343InsufficientMemoryExceptiontype,130int(integer)datatypes,42,45–46,71,401,460intidentifier,35intparameter,248integer(int)datatypes,42,45–46,71,401,460integrateddevelopmentenvironment(IDE),1,57intelligentdatastructure,80IntelliSense,57interfacekeyword,168interfaces,168–170defining,176–177,202–206,280–282INoRemoteControlRoom,203–204IRemoteControlRoom,204–205IRoomplaceholder,202–203ISensorRoom,205–206definingkernelsas,222–223interprocesscommunicationmechanisms,363int.
Parse()method,285InvalidCastExceptiontype,130InvalidOperationExceptionelement,368Invoke()method,380,384IRectangledeclaration,174IRectangleinterface,189IRemoteControlRoominterface,202,204–205IRoomplaceholderinterface,202–203ISensorRoominterface,202,205–206IShapedeclaration,174ISquareinterface,189IsReaderLockHeldproperty,378IsRequiredattribute,356IsWriterLockHeldproperty,378ITaxAccountinterface,183,185ITaxEngineinterface,177,180ITaxIncomeinterface,182items.
Lengthvariable,325Iterate()method,242–243,249IterateBuffers()method,134iteratingdata,usingenumerators,323–324iterationcode,373iterationsparameter,452IWorkbookinterface,307–310IWorksheetinterface,303–307IWorksheetBaseinterface,303–307IWorksheetBasetype,308IWorksheetSerializeclass,316IWorksheetSerializeinterface,320Jjack.
txtfile,390JetDatabaseEngine,393Join()method,364Kkernels,199–201definingasinterfaces,222–223defininginterfaces,202–206INoRemoteControlRoominterface,203–204IRemoteControlRoominterface,204–205INDEX478IRoomplaceholderinterface,202–203ISensorRoominterface,205–206implementing,206–222linkedlists,206–214roomgroupings,214–222keyholeproblems,104–105key/valuepairlists,253–254keywords,abstract,160–162Llambdaexpressions,247–252,255,302,327,366creatingalgorithms,250implementingalgorithmsusing,250–252usinginserver-sidespreadsheets,316–320LanguageIntegratedQuery.
SeeLINQlanguages,69–74cultures,72–74numbers,70–72settinginWindows,69–70LanguageTranslatorclasslibrary,54LanguageTranslatorcomponent,75LanguageTranslatorproject,55lastin,firstout(LIFO)mechanism,232lazyevaluation,450lazyStringdeclaration,452Lengthproperties,286librarycomponent,166LibTaxsolution,166LibTax.
Surtaxnamespace,178LIFO(lastin,firstout)mechanism,232lightingapplicationdefiningrooms,224–225kernels,201–223definingasinterfaces,222–223defininginterfaces,202–206implementing,206–222organizing,200–201PrivateRoomimplementation,225–226PublicRoomimplementation,225–226LightingControllerclass,206,215LightLevelproperty,204LightSwitch()method,205lineartaxrate,166linkedlistscreating,208–209insertingitems,209–210removingitems,209–210storingcollectionsusing,206–208testing,210–214LinkedItemclass,211LinkedListtype,252LINQ(LanguageIntegratedQuery),393,415–438alteringdata,428–430lotteryapplication,calculatingfrequencyofnumbers,415–425overview,415performingsetoperations,434–436processingmultiplestreams,431selectingdata,428–430selectingwithanonymoustypes,430–431sortingresults,431splittingresultsintogroups,433–434Load()method,347LoadConfiguration()method,135element,343,345LoaderSectionclass,346LocalsStackpane,117LocalSalesTaxinterface,444lockkeyword,370locktype,376lockingcode,386locks,372logicaloperators,455longtype,46,49Loopmethod,459lotteryapplication,calculatingfrequencyofnumbers,415–425extendingsystem,416–419implementingsolution,419–425lotteryDataSet.
xsdfile,408lottery-predictionsystem,organizing,257–258LottoLibraryclasslibrary,258LottoTicketProcessor,262Mmagictypes,100–101Managedproperty,296ManagedTypetype,297marshaling,285MaxColsproperty,305MaxRowsproperty,305messageclass-levelscope,22Messageproperty,123metadata,58Method()method,85,236,296,384methods,static,96–99MicrosoftDeveloperNetwork(MSDN),61minornumber,352mixedtypes,234[modification]loop,106modulusoperator,458Monitortype,374,376Monitor.
Enter()method,376,383Monitor.
Exit()method,383Monitor.
Pulse()method,383INDEX479Finditfasterathttp://superindex.
apress.
com/Monitor.
Wait()method,376,383MSDN(MicrosoftDeveloperNetwork),61multicasting,withdelegates,246–247multiplestreams,processing,431multiple-coremicroprocessors,362,386multiplication(*)operators,455multitasking,359–363overview,359–360preemptive,360timeslicing,360–362multithreading,359–387multitasking,359–363overview,359–360preemptive,360timeslicing,360–362producer/consumerarchitecture,380–385asynchronousapproach,384–385generic,382–384hidden,380–381reader/writerthreadedarchitecture,376–380threads,363–376creating,363–364creatingwithstate,365–367deadlocks,372–376synchronizingbetween,367–372waitingforendof,364–365MyImplementationassembly,330MyMethod()method,440MyReferenceTypetype,85MyReferenceTypevariable,84MyType.
MyTypeinstance,296MyTypeparameter,309MyValueTypetype,85MyValueTypevariable,82MyValueTypeWithReferenceTypevariable,84Nnamespace,33NameValueCollectiontype,339navigating,usercontrolsofsolutions,13–15nesteddatatypes,objectinitializationwith,227–228.
NETgenerics,295–328constraints,463–466class,465–466new,465type,463–465needfor,295–298server-sidespreadsheets,327assigningstatewithoutknowingtype,320–322calculatingaverages,324–327defininginterfaces,302–310designingarchitecture,301–302iteratingdatausingenumerators,323–324overridingToString()functionality,322–323theoryof,298–300usinglambdaexpressionsin,320.
NETsoftwaredevelopmentkit(.
NETSDK),1,61newconstraint,465newkeyword,91,191,465newVersionattribute,354Nextdatamember,207–208Nodedeclaration,97Nodeelements,90,101,104initializing,91–92instantiating,91–92switchingtoclassestodefine,94–96Nodestaticconstructor,111Nodevaluetype,89Node.
RootNodesstaticdata,100NotImplementedExceptiontype,130NotSupportedExceptionexception,128–129NotSupportedExceptiontype,130nullparameter,345nullstatement,110nulltype,92Nullableclass,467nullabletypes,466–468NullReferenceExceptiontype,128,130number-relatedtypes,27–51classlibraries,32–44Add()method,34–41numbers,computerunderstandingof,42–44CLRnumerictypes,45–49objects,58–61referencetypes,44–45softwaredevelopment,27–32focusing,30–32organizing,28–30valuetypes,44–45numberscomputerunderstandingof,42–44indifferentlanguages/cultures,70–72NumberStylesenumeration,71,72numericdatatypes,46nvarchar(100)type,402Oobjecthierarchies,165–198inheritance,190–196taxconcepts,165–166taxengineapplication,176–184baseclasses,177–181basefunctionality,185–190basetaxaccount,183–184INDEX480defaultimplementations,181–183defininginterfaces,176–177organizing,166test-drivenarchitecture,167–175C#interfaces,168–170components,173–175inheritance,170–173typecasting,196–197objectinitialization,216ObjectLinkingandEmbedding,Database(OLEDB),393Objectsubclass,316objecttype,296,320–321,340object-oriented(OO)programming,137–163abstractkeywords,160–162currencyconverters,154–158ActiveCurrencyTraderclass,154,156HotelCurrencyTraderclass,156–158currencyexchangeapplication,139–153currencyspreads,138–139preprocessordirectives,159–160propertyscope,160objects,58–61objectsvariable,233Object.
ToString()method,466ODBC(OpenDatabaseConnectivity),393oldVersionattribute,354OLEDB(ObjectLinkingandEmbedding,Database),393onHeapvariable,236onStackvaluetype,236onStackvariable,236OpenDatabaseConnectivity(ODBC),393OpenStandardOutput()method,282operatingsystem,386operators,455–462arithmetic,455–459addition,455–456bitwise,456–458decrement,458–459increment,458–459modulus,458overloading,460–462OR(||)operator,110organizationalcode,116outidentifier,71outkeyword,86outparameters,103,131OutOfMemoryExceptiontype,130OutputPathfield,336outputpaths,335Ovenclass,145overflow,43OverflowExceptiontype,130overloadingbehavior,142overloadingoperators,460–462overridekeyword,172,192,195overriding,141,178–180PParameterNameproperty,IDbDataParametertype,405parameters,85–87Parse()method,71–72,132partialclasskeyword,152partialclasses,152–153,468–470partialkeyword,152,469partialmethods,468–470partialtaxation,166patchnumber,352Peek()method,254,274_percentagedatamember,448Percentageproperty,448PeriodicIncrement()method,381persistence,257–294customtypes,289–293Equals()method,292–293GetHashCode()method,289–292importantstufftoremember,294lottery-predictionsystem,organizing,257–258pipingbinarydata,278–287convertingbinarystreamsintotextstreams,285–287convertingtextsstreamintobinarystreams,284–285defininginterfaces,280–282definingtypes,283–284implementingshells,280–282pipingdatausingconsoles,258–278buildingshells,260–269readingdata,258–260TextProcessorapplication,270–278serialization,287–289custom,287–288declaringdatamembersasnonserializable,288separatingdataobjectsfromactionobjects,288–289person.
Attributesvariable,457personstable,401,402PersonWithAttributesattribute,457pipingdatabinary,278–287convertingbinarystreamsintotextstreams,285–287convertingtextstreamsintobinarystreams,284–285defininginterfaces,280–282definingtypes,283–284implementingshells,280–282INDEX481Finditfasterathttp://superindex.
apress.
com/usingconsoles,258–278buildingshells,260–269readingdata,258–260TextProcessorapplication,270–278placeholderinterfaces,202–204plain-vanillalists,252–253plug-inarchitecture,331Pop()method,254Positionproperties,286preemptivemultitasking,360prefixallotest,67prefixalloappendtest,66preprocessordirectives,159–160Prevdatamember,207–208privateclasses,227privatedeclaration,342privatekeyword,339privatescope,147,148–150PrivateRoomimplementation,225–226Process()method,274ProcessMaximumValue()method,245ProcessRunningTotal()method,245ProcessValuedelegate,243ProcessValue()method,245producer/consumerarchitecture,380–385asynchronousapproach,384–385generic,382–384hidden,380–381producer/consumerlocks,386Program.
csfile,6,13,39,56projects,4properties,137,143–146,168,295problemswith,145–146rewritingtestcodetouse,144–145propertyscope,160propTypeNamedatamember,356protectedmodifier,148protectedscope,147,148–150_provincedatamember,186provinceparameter,186publicidentifier,284publickeyword,22,82,97,339publicmodifier,148publicscope,143,147,148–150publicscopedeclaration,342PublicRoomimplementation,225–226Pulse()method,376Purebehavioral,176purefunctions,441,445–449Push()method,254QQueueclass,232Queuelists,254QueueProcessor()method,383quotes,67RRAM(random-accessmemory),42RDO(RemoteDataObjects),393ReaderWriterclasslibrary,258reader/writerlocks,386reader/writerthreadedarchitecture,376–380ReaderWriterLockclass,376ReaderWriterLocktype,378readingconfigurationfiles,338–339datafromconsoles,258–260enhancedconfigurationfiles,346–347ReadLine()method,274readonlykeyword,447,449read-onlylock,379ReadOnlyCollectiontype,369read/writerimplementation,379RealAmountproperty,182Rectangle.
CalculateArea()method,171RectangleImplclass,174recursion,441,452–453RecursiveCountvariable,452refkeyword,87Referencetypeembeddingreferencetype,85Referencetypeembeddingvaluetype,85referencetypes,44–45,84–85ReferenceHeapclass,236referencing,92–94,330reflection,321#regionhashcode,159relationaldatabases,389–414accessing,394–395,403–407databaserelations,391–393DatasetDesigner,408–413buildingrelationsbetweentables,408–412usinggeneratedcode,412–413designing,usingVisualC#Express,395–403overview,389tables,389–390relations,390,408–412releasemode,160ReleaseLock()method,377ReleaseReaderLock()method,377ReleaseWriterLock()method,377relocatingstronglynamedassembliestoGAC,349–351RemoteDataObjects(RDO),393remoteInitializefunction,451Remove()method,210,253removingitemsfromlinkedlists,209–210renamingsolutions,Windowsapplicationproject,6–7responsibility,57INDEX482resultssorting,431splittingintogroups,433–434returnkeyword,103,459returnArray[c1]arrayelement,110retvalvariable,132roomgroupingsadding,215–217addingroomsto,221finding,217–220implementing,214–215performingoperationson,221–222RoomGroupingclass,215RoomIterator()method,222Roomsdatamember,216_rootarrayelement,106_root.
Lengthproperty,105RootNodesdatamember,97,101Run()method,355RunAll()method,118,125runtimeconfigurationfile,329Ssafecode,25SalesTaxclass,448SalesTaxproperty,444salesTaxvariable,445sandboxingcode,127–128savingsolutions,Windowsapplicationproject,7sbytetype,46scope,21scopemodifiers,148–150sealedkeyword,182searchalgorithm.
Seedepth-firstsearchalgorithmSearchAlgorithmclass,100SearchSolutionproject,89SecondElementsubelement,337node,344SELECTcommand,406,411selecting,428–431separatingdataobjectsfromactionobjects,288–289Serializableattribute,284serialization,287–289custom,287–288declaringdatamembersasnonserializable,288separatingdataobjectsfromactionobjects,288–289serializing,359server-sidespreadsheets,327assigningstatewithoutknowingtype,320–322calculatingaverages,324–327defininginterfaces,302–310Debug,302–303IWorkbook,307–310IWorksheet,303–307IWorksheetBase,303–307designingarchitecture,301–302iteratingdatausingenumerators,323–324overridingToString()functionality,322–323theoryof,298–300usinglambdaexpressionsin,316–320ServerSideSpreadsheetclasslibrary,301setcodeblock,144setoperations,434–436setproperty,160SetCellState()method,325SetTemperature()method,146setters,144Shape.
CalculateAreamethod,171SheetCoordinatetype,305shellsbuilding,260–269echoprograms,260–261implementingstreamreading/writing,265–269reading/writingtostreams,261–265implementing,280–282shorttype,46shortvalue,456signingassemblies,334single-coremicroprocessor,362singletons,341–342Sizeproperty,IDbDataParametertype,405softwaredevelopment.
Seedevelopment,softwaresolutionsaddingclasslibraryprojectto,17–18addingconsoleapplicationprojectto,16defined,4navigatingusercontrolsof,13–15renamingWindowsapplicationproject,6–7savingWindowsapplicationproject,7SomeMethod()method,440SomeObjecttype,440SomeObject.
Valuetype,440SortedDictionaryclass,253sortingresults,431SourceColumnproperty,IDbDataParametertype,405specialnotation,193specificsparameter,187Split()method,274,303_spreaddatamember,157spreadparameter,157SpreadSheetclass,301INDEX483Finditfasterathttp://superindex.
apress.
com/SQL(StructuredQueryLanguage),231SQLServerCompactEditionADO.
NETdriver,403SqlCeCommandinterface,407SqlCeConnectioninterface,407SqlCeParameterinterface,407SqlCeParametertype,404SquareImplclass,174Stackclass,232Stacklists,254stackunwinding,124–128finallykeyword,126–127sandboxingcode,127–128Start()method,364startparameter,104,105[startingcondition]loop,106startNodesvariable,101state,creatingthreadswith,365–367threadparameters,366–367ThreadStartdelegate,365–366Statedatamember,251staticclass,34staticdatamembers,96–99staticdeclaration,181statickeyword,22Static()method,251staticmethods,96–99staticmodifier,96staticproperty,342,346StaticInstantiate()method,244StaticProcess()method,244storingcollectionsusinglinkedlists,206–208Stringclass,61stringtypes,53–75,303languages/cultures,69–74numbers,70–72settinginWindows,69–70overview,57–62character-by-charactercomparison,61–62objects,58–61softwaredevelopment,organizing,53–54translatorapplication,54–68charactermapping,67–68creatingtestapplication,56–57creatingTranslatorclass,55quotes,67responsibility,57translatinghello,55–56whitespace,63–67StringBuilderclass,75StringReadertype,274structdeclaration,467structkeyword,89,467structs,declaring,81Structuralcode,140structuralprogrammingtechniques,199StructuredQueryLanguage(SQL),231substrings,finding,64subtraction(-)operators,455switchcasestatement,463synchronizing,betweenthreads,367–372withcloning,371–372exclusivelocks,369–371syncRootobject,370Systemnamespace,129,385System.
Collectionsnamespace,232System.
Collections.
ObjectModel.
ReadOnlyCollectiontype,368System.
Collections.
ReadOnlyCollectiontype,369System.
configurationreference,332System.
Configuration.
ConfigurationSectionsubclass,344System.
Console.
WriteLine()method,20SystemExceptiontype,130System.
InvalidOperationexception,468System.
Runtime.
Serialization.
Formatters.
Binary.
BinaryFormattertype,285System.
Threadingnamespace,363System.
Threading.
ReaderWriterLockclass,376Ttabledata,addingtorelationaldatabases,403–405tablevariable,413table.
Fill()method,413tablesaddingtodatabases,399–403drawstable,401personstable,401–402winnerstable,402–403buildingrelationsbetween,408–412relationaldatabase,389–390selectingdatafrom,406taskinstance,366TaskListwindow,265TaskManagerwindow,360task.
MethodToRun()method,366taxconcepts,165–166taxengine,184taxengineapplicationbaseclass,177–181abstractinginstantiationswithfactories,180–181overridingforspecializedfunctionality,178–180basefunctionality,185–190assigningstate,186–187implementingideaswithspecifics,187–189INDEX484basetaxaccount,183–184defaultimplementations,181–183defininginterfaces,176–177organizing,166taxableincome,165–166TaxableAmountproperty,182_taxableRatedatamember,182TaxAccountclass,185,187TaxDeductionclass,183TaxEngineclass,188TaxEngine.
CalculateTaxToPay()method,179TaxIncomeclass,183TDD(test-drivendevelopment),214Temperatureproperty,145–146test[N]variables,109TestCalculatorproject,38TestCallingExample()method,131TestCurrencyTraderclass,148,150,154TestCurrencyTraderconsoletestingapplication,139test-drivenarchitecture,167–175C#interfaces,168–170components,173–175inheritance,170–173test-drivendevelopment(TDD),214TestGetValue()method,132testingAdd()methodaddingtestprojects,38testingadditionoftwolargenumbers,40–41testingsimpleaddition,39–40creatingtestapplications,56–57definingalgorithmtests,99–103gettingFoundRoutedatamember,101–103magictypes,100–101linkedlists,210–214writingtestsbeforewritingcode,65–67testingtools,214TestInsert()method,213TestLanguageTranslatorclasslibrary,54TestLanguageTranslatorproject,56TestServerSideSpreadsheetclasslibrary,301TestSimple()method,384TestSimpleAddition()method,40TestTaxsolution,166textstreams,convertingintobinarystreams,284–285Text2Binaryapplication,257Text2Binary.
execommand,279TextBoxcontrol,9TextProcessorapplication,257–258,270–278decipheringformat,273–275fixingdatastream,275–278duplicatedates,277–278emptyfields,277emptylinesoftext,276–277incorrectdataformat,277toomanyfields,277TextProcessorCommandLines,260TextProcessor.
execommand,260,279TextProcessor.
Main()method,262TextReadertypes,280TextWritertypes,280ThirdElementsubelement,337thiskeyword,242thisreference,148Threadinstances,366threadparameters,366–367threadpool,383Threadtype,365thread1.
Start()method,364thread2.
Start()method,364Thread.
CurrentThread.
CurrentCulture()method,73ThreadedTasktype,366ThreadPoolProducerConsumerconstructor,383ThreadPoolProducerConsumertype,383–384ThreadPool.
QueueUserWorkItem()method,383threads,363–376,386creating,363–364creatingwithstate,365–367threadparameters,366–367ThreadStartdelegate,365–366deadlocks,372–376synchronizingbetween,367–372withcloning,371–372exclusivelocks,369–371waitingforendof,364–365Thread.
Sleep()method,367,376–377ThreadStartdelegate,365–366throughput,386throwkeyword,122timeslice,386timeslicing,360–362toCurrencyparameter,154_toCurrencyproperty,155Tokenize()method,133ToString()method,59,74,211,274,322–323,325,327totalvariable,36TraderBaseClassclass,316TranslateHello()method,56–57,63TranslateHello.
TranslateHello()method,55INDEX485Finditfasterathttp://superindex.
apress.
com/TranslateWord()method,343translatorapplication,54–68charactermapping,67–68creatingtestapplications,56–57quotes,67responsibility,57translatinghello,55–56Translatorclass,55whitespace,63–67findingsubstrings,64trimming,63writingtestsbeforewritingcode,65–67Translatorclass,55Translator.
csfile,55TrimmingWhitespace()method,63truthtables,269tryblock,121,127–128trykeyword,120try/catchblock,134–135TryParse()method,71–72,132typeattribute,344typecasting,173,196–197typecommand,279typeconstraint,463–465typemethod,448TypeNamepropertyidentifier,356typeof(string)parameter,345types.
Seealsocustom-definedtypes;number-relatedtypes;stringtypescustom,289–293Equals()method,292–293GetHashCode()method,289–292defining,283–284dynamicallyinstantiatingusinginstantiatedtypes,342–343usingsingletons,341–342Type-safe,35Uuinttype,46ulongtype,46UML(UnifiedModelingLanguage),28unboxing,235#undefhashcode,159underflow,43Unicode,68UnifiedModelingLanguage(UML),28uniqueidentifiertype,402Unstable,352UpgradeToWriterLock()method,376usability,301Userassembly,223userinterface,31user-definedtypes.
Seecustom-definedtypesusername,395ushorttype,46usingkeyword,19,180usingstatement,34Vvalvariable,462valueparameter,320Valueproperty,IDbDataParametertype,405Valuetype,85valuetypes,44–45,235–236constraints,81–87effectsofcopyingdata,82–84parameters,85–87referencetypes,84–85referencingusing,92–94valuevariable,145,349ValueTypetype,321variables,classlibraryproject,21–23verification,150–153conditionalstatements,150–151partialclasses,152–153VerifyExchangeRate()method,152versionnumbers,dynamicloadingofstronglynamedassembliesusing,351–354addingassemblyredirectiontoconfigurationfiles,353–354versioningassemblies,352–353VersionAssemblyassembly,353versioningassemblies,352–353virtualbaseclassmethod,192virtualkeyword,178,192,195VisualC#Express,1–26applicationtypes,4classlibraryproject,17–23addingtosolutions,17–18callingfunctionality,19–20constants,21–23definingreferences,19movingfunctionality,18variables,21–23consoleapplicationproject,16–17addingtosolutions,16"hello,world",16running,17settingstartupproject,17DataSourceConfigurationWizard,396designingrelationaldatabasesusing,395–403addingtables,399–403configuringDataSource,396–399downloading,2–3installing,3–4navigatingusercontrolsofsolutions,13–15.
NETFramework,23–25overview,1INDEX486projects,4solutions,4Windowsapplicationproject,5–13addingcommentsto,12–13"hello,world",9–11renamingsolutions,6–7running,7–8savingsolutions,7viewingsourcecode,6VisualWebDeveloperExpress,2Wwherestatement,463whileloop,413whitespace,63–67character-by-charactercomparison,61–62findingsubstrings,64responsibility,57trimming,63writingtestsbeforewritingcode,65–67Windowsapplicationproject,5–13addingcommentsto,12–13"hello,world",9–11renamingsolutions,6–7running,7–8savingsolutions,7viewingsourcecode,6Windows,settinglanguages/culturesin,69–70Windows.
FormsInvoke()method,383Windows.
Formslibrary,380Windows\System32directory,349winnerstable,402–403wordallotest,66worksheetvariable,320Worksheetclass,314,322,327Worksheettype,304Worksheettype,304Worksheettype,304worksheet.
Calculate()method,326WorksheetIdentifiersclass,308writingexception-safecode,130–135defaultstate,133–134defensivecoding,130–133processingwarningerrors,134–135writingtestsforcurrencyexchangeapplication,139–153baseclasses,140–141,153C#properties,143–146inheritance,141–143,147–148scopemodifiers,148–150structuralcode,140verification,150–153XXML(ExtensibleMarkupLanguage),336XML-basedconfigurationfiles,336–337.
xsdfile,408Y_yeardatamember,186yearparameter,186yieldkeyword,219–220,231,323yieldreturnstatement,220,222INDEX487Finditfasterathttp://superindex.
apress.
com/
每年的7月的最后一个周五是全球性质的“系统管理员日”,据说是为了感谢系统管理员的辛苦工作....friendhosting决定从现在开始一直到9月8日对其全球9个数据中心的VPS进行4.5折(优惠55%)大促销。所有VPS基于KVM虚拟,给100M带宽,不限制流量,允许自定义上传ISO...官方网站:https://friendhosting.net比特币、信用卡、PayPal、支付宝、微信、we...
妮妮云的知名度应该也不用多介绍了,妮妮云旗下的云产品提供商,相比起他家其他的产品,云产品还是非常良心的,经常出了一些优惠活动,前段时间的八折活动推出了很多优质产品,近期商家秒杀活动又上线了,秒杀产品比较全面,除了ECS和轻量云,还有一些免费空间、增值代购、云数据库等,如果你是刚入行安稳做站的朋友,可以先入手一个119/元季付的ECS来起步,非常稳定。官网地址:www.niniyun.com活动专区...
今天中午的时候看到群里网友在讨论新版本的Apache HTTP Server 2.4.51发布且建议更新升级,如果有服务器在使用较早版本的话可能需要升级安全,这次的版本中涉及到安全漏洞的问题。Apache HTTP 中2.4.50的修复补丁CVE-2021-41773 修复不完整,导致新的漏洞CVE-2021-42013。攻击者可以使用由类似别名的指令配置将URL映射到目录外的文件的遍历攻击。这里...
queueuserworkitem为你推荐
weipin唯品购,weipuvip,是诈骗网站么?充了钱之后提不出,各种套路继续充钱iphone5解锁苹果5忘了锁屏密码怎么解锁密码雅虎社区雅虎资讯在哪里提交邮箱打不开怎么办126邮箱打不开怎么办伪静态如何设置伪静态规则照片转手绘美图秀秀可以照片转手绘吗?是手机版的arm开发板ARM开发板和树莓派有什么区别数码资源网有什么网站弄相片效果比较好的?ps抠图技巧请教PS抠图技巧!!!苹果5怎么越狱苹果5怎么越狱?
主机测评 webhosting cpanel la域名 免备案空间 外国空间 42u标准机柜尺寸 美国php主机 debian源 架设服务器 老左正传 泉州电信 web服务器安全 如何安装服务器系统 申请网页 电信托管 最漂亮的qq空间 512mb 太原联通测速 我的世界服务器ip 更多