C# 简介毕业论文外文翻译.docx
《C# 简介毕业论文外文翻译.docx》由会员分享,可在线阅读,更多相关《C# 简介毕业论文外文翻译.docx(9页珍藏版)》请在冰点文库上搜索。
附录1英文文献翻译
1.英文
1.1 INTROUCTIONTOC#
1.1.1 TheBirthofC#
Asarecentbirthintheprogramminglanguagefamily#hastwoprogramminglanguageparents++andJava#containsmanyC++featuresbutalsoaddstheobject-orientedfeaturesfromJava.
C#containsmanydifferentcomponents,including:
• Versioningsupport,sothatyourbaseandderivedclasses-templatesthatdefinehowanobjectperforms一remaincompatibleasyoudevelopthem
• Events,sothatyourprogramcannotifyclientsofaclassaboutsomethingthathashappenedtoanobject
• Typesafetyandverificationthatincreasesreliabilityandensurescodesecurity
• Garbagecollection,sothatyourprogramcanidentityobjectsthatyourprogramcannolongerreach
• Unsafemode,whereyoucanusepointerstomanipulatememoryoutsidethegarbagecollector'scontrol,includingmethodsandproperties
1.1.2 CloseRelationswithCandC++
C#isbuiltontheC++language,soitbehavesmuchlikethelanguage.LikeC++,C#letsyouwriteenterpriseapplications,andC#containsmanyC++features,includingstatementsandoperators.C#alsoprovidesaccesstocommonApplicationProgramInterface(API)stylesincludingComponentObjectModel(COM)andC-styleAPIs.
1.1.3 Security
ComputernetworksletprogrammersshareVisualStudio.NETcodeincludingC#programsacrossthenetwork.ThiscollaborativeeffortletsyouandyourprogrammingteamcreateC#programsmuchmorequicklythanonepersonalone.TheproblemwithcollaboratingoveranetworkisthatunauthorizedusersfromwithinoroutsideyournetworkmaytrytogainaccesstoyourC#programcode.
VisualStudio.NETprovidesbuilt-insecurityfeaturessoyouortheleaderofyourprogrammingteamcandeterminewhoonyournetworkgetsaccesstoyourC#programcodeandresources.Youcanalsosetdifferentlevelsofsecurityfordifferentpeopleincaseyouwantonlycertainpeopletohaveaccesstocertainprogramcode.
1.1.4 Integration
TheprimaryadvantageofusingVisualStudio.NETisthatalloftheprogramminglanguageshavebeendesignedtoworktogetherfromthestart.WhenyouwriteanewC#program,VisualStudio.NETgivesyoutoolsthatyoucanusetoprogramlinksfromyourC#programintoanotherprogramwritteninanotherVisualStudio.NETlanguage.
Forexample,youcancreateadatabaseinVisualFoxProandthencreateaC#programthatlinksintotheVisualFoxProdatabase.IfyouhavewrittenoracquiredcompletedprogramsinaVisualStudiolanguagesuchasVisualC++orVisualBasic,youcanincludelinksfromyourC#programintothoseprograms.Theendresultisseamlessintegratedfunctionalitybetweenprograms.
1.1.5 DifferencesBetweenC#andC++
MicrosoftincludesVisualC++andC#inVisualStudio.NET.Onthesurface#hasfewdifferencesfromVisualC++.Whenyoulookcarefullyandstartprogramming,youwillnoticethatC#differsinseveralimportantrespectsfromVisualC++:
• C#hasanalternatemethodofaccessingtheC++initializationlistwhenconstructingthebaseclass.
• Aclasscaninheritimplementationfromonlyonebaseclass.
• Youcancalloverriddenbaseclassmembersfromderivedclasses.
• C#hasadifferentsyntaxfordeclaringC#arrays.
• Therearedifferencesinseveraldifferenttypesincludingbool,struct,anddelegate.
• TheMainmethodisdeclareddifferently.
• Supportofthenewrefandoutmethodparametersthatareusedinsteadofpointersforpassingparametersbyreference.
• Newstatementsincludingswitchandfinally.
• Newoperatorsincludingisandtypeof.
• Differentfunctionalityforsomeoperatorsandforoverloadingoperators.
1.1.6 DLLs
TheadventofWindowsbroughtdynamiclinklibraries(DLLs)toprogrammers.DLLsaresmall,independentprogramsthatcontainexecutableroutinesthatprogramscanusetoproduceacertainresultinWindows.Forexample,ifaprogramneedstoopenafile,youcanwriteyourC#programthatusesthecodeintheDLLtoopenthefile.UsingDLLsfreesupyourtimetoworkonyourprogramwithouthavingtoreprogramthesamecodeinyourC#programoverandoveragain.
YoucanaccessDLLsfromyourC#program,andcreateDLLsinC#foryourC#foryourC#programtorefertowhennecessary.C#hasfullCOM/Platformsupport,soyoucanintegrateC#codewithanyprogramminglanguagethatcanproduceCOMDLLssuchasVisualC++.
1.1.7 XML
ExtensibleMarkupLanguage(XML)isamorepowerfulversionofHyperTextMarkupLanguage(HTML),thestandardWebpagelanguage.VisualStudio.NETandC#letyoudocumentyourprogramusingXMLandthenextracttheXMLcodeintoaseparatefile.
VisualStudio.NETsupportsXMLsothatyoucanintegrateyourC#programswiththeWorldWideWeb.YoucandocumentyourC#codeusingXMLandthenuseXMLforcreatingWebServicesandWebcontrolsthatletyouandyourcodeinteractwithaWebsite.Forexample,youmayhaveaninventorysystemwritteninC#thatinteractswiththeorder-takingpageonyourcompany'sWebSite.
1.2 STARTVISUALSTUDIO.NET
VisualStudio.NETcontainsagraphicalprogrammingenvironmentcalledtheMicrosoftDevelopmentEnvironment(MDE).TheMDEenablesyoutocreateprogramsinVisualC#andotherVisualStudio.NETlanguages.
WhenyoustartVisualStudo.Net,theMDEwindowappearswithseveralwindowswithintheMDEwindows.InthelargestareaoftheMDEwindow,whichiscalledtheparentwindow,theVisualStudioStartpageappears.TheStartpagelistsanyrecentprojectsandprovidestwobuttonssothatyoucanopenaprojectfileorcreateanewproject.
TheStartpageletsyoulogintotheMicrosoftDevelopersNetwork(MSDN)WebsitedirectlyfromtheMDE,soyoucanreceivethelatestinformationfromMicrosoftaboutVisualStudio,gettechnicalhelpfromfellowVisualStudiousersatMicrosoft'sonlineforum,andsearchforinformationonline.
VisualStudio.NETalsoletsyoucreateandchangeyourprofilesothatcanviewwindows,enterkeyboardcommands,andreceivehelpfortheprogramminglanguageinwhichyouareworking.Forexample,ifyouhaveusedanolderversionofVisualStudiointhepastandyouprefertousetheoldwindowsandkeyboardcommands,VisualStudioletsyouuseVisualBasicandC++windowsandmenus.
1.3 OPENANEWC#PROJECT
AfteryoustarttheMDEwindows,youcanopenanewproject.AprojectcontainsallthefilesrelatedtoyourC#program.AfteryoudeterminethetypeofC#programyouwanttowrite,VisualStudiocreatesalloftheprojectfilesyouneedtostartprogramming.VisualStudiocontainsprograms.TheMDEwindowletsyoucreateeightdifferentprojectssoyoucantailoryourC#programtotheneedsofyourprogramusers.
Youcancreatethreedifferentapplicationtypes,eachwithadifferentuserinterface.First,youcancreateaWindowsapplicationthathasagraphical,form-basedinterface.Youcancreateaconsoleapplicationwithacharacter-basedinterface.Finally,youcancreateaWebapplicationthatresidesonaWebserverandusesWebpagesforitsinterface.
Youcancreatethreetypesofprogramsthatarenotfull-fledgedbutprovidecomponentsthatotherprogramscanuse.First,youcancreateaclasslibraryprogramsoyoucanprovideclassforotherprograms.Second,youcancreateaWindowscontrollibraryforcreatingformcontrolssuchasbuttons.Third,youcancreateaWebcontrollibraryprogramthatprovidesWebcontrolsforyourWeb-basedC#programs.
WhentheOpenProjectwindowappears,itshowsalltheprojectsinthedefaultprojectfolder,MyProjects.ByclickingoneoftheiconsontheleftsideoftheProjectLocationwindow,youcanchoosethefolderfromwhichaprojectisopened.
IntheProjectLocationwindows,youcanalsoselectanyfolderonyourharddrivebyclickingtheDownArrownexttotheLookinfieldandthenselectingyourdrive.Thefoldersontheselecteddriveappearinthewindow.
1.4 EXPLORINGTHEC#INTERFACE
WhenyoustartanewC#project,C#createsdefaultclassesthatdefineandcategorizetheelementsinyournewprogram.Forexample,ifyoustartanewprogram.Forexample,ifyoustartanewWindowsapplicationthathasobjects.TheClassViewwindowletsyouviewallyourclassesandtheirrelatedcomponentssoyouknewexactlywhatisinyourclasscodewithouthavingtosearchthroughthecode.
TheClassViewwindowgivesyouaconvenientwaytoseewithwhichclassanobjectinyourprogramisassociatedwithouthavingtocloseorminimizeyourprogramcodeorform.TheClassViewwindowappearsinthesamespaceintheMicrosoftDevelopmentEnvironmentwindowastheSolutionExplorerwindow.
Theclassinformationappearsinatreeformatthatyoucanexpandtoviewallclassesassociatedwithaparticularprogramcomponent,suchasaform.Ifyouhavemorethanoneprograminaproject,theClassViewwindowtreeletsyouaccessclassesforalltheprogramsintheproject.
Ifyouwanttoseeclassesthatmeetcertaincriteria,youcansortclassesinthetreealphabetically,bytypeforviewingrelatedclassesinyourprogram,orbyaccess.
IftheClassViewwindowisnotavailableasatabatthebottomoftheSolutionExplorerwindow,youcanaccesstheClassViewwindowfromthemenubar.
YoucanopentheClassViewwindowbyclickingViewandthenClassViewonthemenu.YoucanalsoopentheClassViewwindowbypressingCtrl+Shift+C.NomatterifyouaccesstheClassViewwindowusingthemenuorthekeyboard,afteryouopentheClassViewwindow,itreplacestheSolutionExplorerintheupper-rightcorneroftheparentwindow.
Whenyouclickaclass,thepropertiesforthatclassappearinthePropertieswindow;thePropertieswindowappearsbelowtheClassViewwindow.
IfyoudonothavethePropertieswindowopen,youcanright-clicktheclassandthenclickPropert