Tải bản đầy đủ - 0 (trang)
Appendix A. Answers to Quizzes and Exercises

Appendix A. Answers to Quizzes and Exercises

Tải bản đầy đủ - 0trang

SectionA.17.Chapter17:DelegatesandEvents

SectionA.18.Chapter18:CreatingWindowsApplications

SectionA.19.Chapter19:ProgrammingASP.NET

Applications



A.1.Chapter1:C#and.NETProgramming

A.1.1.Quiz



SolutiontoQuestion11.

TheCommonLanguageRuntimeistheplatformfor.NET

applicationsthatallowyoutodevelopyourapplicationin

any.NETlanguages(C#,VisualBasic2005,etc.)andhave

themallrunseamlesslyonasingleplatform.



SolutiontoQuestion12.

Console,Windows,Web,andWebServices.



SolutiontoQuestion13.

TheFrameworkspecifieshow.NETconstructsintrinsic

types,classes,interfaces,etc.



SolutiontoQuestion14.

TheFrameworkClassLibraryprovidesaverylargesuiteof

predefinedclassesthatyoucanuseinbuildingyour

application.



SolutiontoQuestion15.

Thisrefersto"typesafety"theabilityofthecompilerto

ensurethattheobjectsyoucreateareoftheexpectedtype.



SolutiontoQuestion16.

Keywordsarereservedforusebythelanguageandcannot

beusedtoidentifyobjectsormethodsyoucreate.



SolutiontoQuestion17.

Namespacesareusedtoensurethatidentifiersareunique

acrosslibrariesofclasses.



SolutiontoQuestion18.

Thejobofthecompileristoturnyoursourcecodeinto

MSIL.



SolutiontoQuestion19.

TheMicrosoftIntermediateLanguageisthenativelanguage

for.NETandiscompiledintoanexecutableapplicationby

theJIT.



SolutiontoQuestion110.

TheJustInTimecompilerturnsyourMSILcodeintoan

applicationinmemory.



A.1.2.Exercise



SolutiontoExercise1-1.

Theinstructionsforcreatingthisprogramarefoundin

Chapter1.







A.2.Chapter2:VisualStudio2005

A.2.1.Quiz



SolutiontoQuestion21.

Aprojectresultsintheproductionofanexecutableora

library.Mostsolutionsconsistofasingleproject,butmany

consistoftwoormore.



SolutiontoQuestion22.

Clickanddragonthetitlebar;usetheindicatorsfor

placement.



SolutiontoQuestion23.

Togglesbetweenlockinplace,andhideasatab.



SolutiontoQuestion24.

F5indicatesrunwithdebugging;Ctrl-F5indicatesrun

withoutdebugging.



SolutiontoQuestion25.



Allowsyoutostoremorethanoneitemontheclipboard.



SolutiontoQuestion26.

Ctrl-Shift-Vcyclesthroughalltheselections.



SolutiontoQuestion27.

Allowsyoutosearchforsymbols(namespaces,classes,and

interfaces)andtheirmembers(properties,methods,

events,andvariables).



SolutiontoQuestion28.

Atoolforreturningtoaspecificplaceinyourcode.



SolutiontoQuestion29.

Aneditingtooltohelpyoufindtherightmethodand/orthe

correctparametersandmuchmore.



SolutiontoQuestion210.

Acompleteoutlineofacommonlyusedprogramming

structurewithreplaceableitemstospeeddevelopment.



A.2.2.Exercises



SolutiontoExercise2-1.

InsertabookmarkbeforetheConsole.Writeline()statementin

HelloWorld.Navigateawayfromitandthenusethe

Bookmarksmenuitemtoreturntoit.

YourVisualStudiowindowshouldlooksomethinglikeFigureA1.



FigureA-1.Exercise2-1



SolutiontoExercise2-2.



UndocktheSolutionExplorerwindowfromtherightsideof

theIDEandmoveittotheleft.Leaveitthereifyoulikeor

moveitback.

YourVisualStudiowindowshouldlooksomethinglikeFigure

A-2.



SolutiontoExercise2-3.

InsertacodesnippetforaforloopfromtheEdit

IntellisensemenuintoyourHelloWorldprogram.(Itwon't

doanythingfornow;you'lllearnaboutforloopsinChapter

4.)

YourVisualStudiowindowshouldlooksomethinglikeFigureA3.



FigureA-2.Exercise2-2







A.3.Chapter3:C#LanguageFundamentals

A.3.1.Quiz



SolutiontoQuestion31.

TrueorFalse.



SolutiontoQuestion32.

intistheC#aliasforthe.NETInt32type.Theycanbeused



interchangeably.



SolutiontoQuestion33.

Allexceptthelast,whichrequiresanexplicitcast:

intnewInt=(int)myLong;



SolutiontoQuestion34.

Auintisanunsignedintandcanholdonlypositive

numbers,butitcanholdapositivevaluetwiceasbigasan

int(4million+ratherthan2million+).



SolutiontoQuestion35.

Afloattakesfourbytesandadoubletakeseightbytes,and

thusadoublecanrepresentmuchlargervalueswithgreater

precision.



FigureA-3.Exercise2-3



SolutiontoQuestion36.

InC,ifyouwishtouseavariableofanytype(passitasa

parametertoamethod),youmustassignitavalue.



SolutiontoQuestion37.



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Appendix A. Answers to Quizzes and Exercises

Tải bản đầy đủ ngay(0 tr)

×