资源描述:
《c#语言和.net framework介绍 毕业论文外文翻译》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、附录1:英文原文IntroductiontotheC#Languageandthe.NETFrameworkⅠC#languageC#syntaxishighlyexpressive,yetitisalsosimpleandeasytolearn.Thecurly-bracesyntaxofC#willbeinstantlyrecognizabletoanyonefamiliarwithC,C++orJava.Developerswhoknowanyoftheselanguagesaretypicall
2、yabletobegintoworkproductivelyinC#withinaveryshorttime.C#syntaxsimplifiesmanyofthecomplexitiesofC++andprovidespowerfulfeaturessuchasnullablevaluetypes,enumerations,delegates,lambdaexpressionsanddirectmemoryaccess,whicharenotfoundinJava.C#supportsgenericm
3、ethodsandtypes,whichprovideincreasedtypesafetyandperformance,anditerators,whichenableimplementersofcollectionclassestodefinecustomiterationbehaviorsthataresimpletousebyclientcode.InC#3.0,Language-IntegratedQuery(LINQ)expressionsmakethestrongly-typedquery
4、afirst-classlanguageconstruct.Asanobject-orientedlanguage,C#supportstheconceptsofencapsulation,inheritance,andpolymorphism.Allvariablesandmethods,includingtheMainmethod,theapplication'sentrypoint,areencapsulatedwithinclassdefinitions.Aclassmayinheritdire
5、ctlyfromoneparentclass,butitmayimplementanynumberofinterfaces.Methodsthatoverridevirtualmethodsinaparentclassrequiretheoverridekeywordasawaytoavoidaccidentalredefinition.InC#,astructislikealightweightclass;itisastack-allocatedtypethatcanimplementinterfac
6、esbutdoesnotsupportinheritance.Inadditiontothesebasicobject-orientedprinciples,C#makesiteasytodevelopsoftwarecomponentsthroughseveralinnovativelanguageconstructs,includingthefollowing:(1)Encapsulatedmethodsignaturescalleddelegates,whichenabletype-safeeve
7、ntnotifications.(2)Properties,whichserveasaccessorsforprivatemembervariables.(3)Attributes,whichprovidedeclarativemetadataabouttypesatruntime.(4)InlineXMLdocumentationcomments.(5)Language-IntegratedQuery(LINQ)whichprovidesbuilt-inquerycapabilitiesacrossa
8、varietyofdatasources.IfyouhavetointeractwithotherWindowssoftwaresuchasCOMobjectsornativeWin32DLLs,youcandothisinC#throughaprocesscalled"Interop."InteropenablesC#programstodoalmostanythingthatanativeC++applicationcando.C#ev