1、 Reference numberISO/IEC 23270:2006(E)ISO/IEC 2006Information technology Programming languages C# Technologies de linformation Langages de programmation C# International Organization for Standardization (ISO), 2006. All rights reserved. International Electrotechnical Commission (IEC), 2006. All righ
2、ts reserved. NOT FOR RESALE. National Standard of CanadaCAN/CSA-ISO/IEC 23270:07(ISO/IEC 23270:2006)International Standard ISO/IEC 23270:2006 (second edition, 2006-09-01) has been adopted withoutmodification (IDT) as CSA Standard CAN/CSA-ISO/IEC 23270:07, which has been approved as a NationalStandar
3、d of Canada by the Standards Council of Canada.ISBN 978-1-55436-645-3 November 2007Legal Notice for StandardsCanadian Standards Association (CSA) standards are developed through a consensus standards development process approved by theStandards Council of Canada. This process brings together volunte
4、ers representing varied viewpoints and interests to achieve consensusand develop a standard. Although CSA administers the process and establishes rules to promote fairness in achieving consensus, it doesnot independently test, evaluate, or verify the content of standards.Disclaimer and exclusion of
5、liabilityThis document is provided without any representations, warranties, or conditions of any kind, express or implied, including, withoutlimitation, implied warranties or conditions concerning this documents fitness for a particular purpose or use, its merchantability, or itsnon-infringement of
6、any third partys intellectual property rights. CSA does not warrant the accuracy, completeness, or currency of anyof the information published in this document. CSA makes no representations or warranties regarding this documents compliance withany applicable statute, rule, or regulation.IN NO EVENT
7、SHALL CSA, ITS VOLUNTEERS, MEMBERS, SUBSIDIARIES, OR AFFILIATED COMPANIES, OR THEIR EMPLOYEES,DIRECTORS, OR OFFICERS, BE LIABLE FOR ANY DIRECT, INDIRECT, OR INCIDENTAL DAMAGES, INJURY, LOSS, COSTS, OR EXPENSES,HOWSOEVER CAUSED, INCLUDING BUT NOT LIMITED TO SPECIAL OR CONSEQUENTIAL DAMAGES, LOST REVE
8、NUE, BUSINESSINTERRUPTION, LOST OR DAMAGED DATA, OR ANY OTHER COMMERCIAL OR ECONOMIC LOSS, WHETHER BASED IN CONTRACT,TORT (INCLUDING NEGLIGENCE), OR ANY OTHER THEORY OF LIABILITY, ARISING OUT OF OR RESULTING FROM ACCESS TO ORPOSSESSION OR USE OF THIS DOCUMENT, EVEN IF CSA HAS BEEN ADVISED OF THE POS
9、SIBILITY OF SUCH DAMAGES, INJURY, LOSS,COSTS, OR EXPENSES.In publishing and making this document available, CSA is not undertaking to render professional or other services for or on behalf of anyperson or entity or to perform any duty owed by any person or entity to another person or entity. The inf
10、ormation in this document isdirected to those who have the appropriate degree of experience to use and apply its contents, and CSA accepts no responsibilitywhatsoever arising in any way from any and all use of or reliance on the information contained in this document.CSA is a private not-for-profit
11、company that publishes voluntary standards and related documents. CSA has no power, nor does itundertake, to enforce compliance with the contents of the standards or other documents it publishes.Intellectual property rights and ownershipAs between CSA and the users of this document (whether it be in
12、 printed or electronic form), CSA is the owner, or the authorizedlicensee, of all works contained herein that are protected by copyright, all trade-marks (except as otherwise noted to the contrary), andall inventions and trade secrets that may be contained in this document, whether or not such inven
13、tions and trade secrets are protectedby patents and applications for patents. Without limitation, the unauthorized use, modification, copying, or disclosure of this documentmay violate laws that protect CSAs and/or others intellectual property and may give rise to a right in CSA and/or others to see
14、k legalredress for such use, modification, copying, or disclosure. To the extent permitted by licence or by law, CSA reserves all intellectualproperty rights in this document.Patent rightsAttention is drawn to the possibility that some of the elements of this standard may be the subject of patent ri
15、ghts. CSA shall not be heldresponsible for identifying any or all such patent rights. Users of this standard are expressly advised that determination of the validity ofany such patent rights is entirely their own responsibility.Authorized use of this documentThis document is being provided by CSA fo
16、r informational and non-commercial use only. The user of this document is authorized to doonly the following:If this document is in electronic form:.load this document onto a computer for the sole purpose of reviewing it;.search and browse this document; and.print this document.Limited copies of thi
17、s document in print or paper form may be distributed only to persons who are authorized by CSA to have suchcopies, and only if this Legal Notice appears on each such copy.In addition, users may not and may not permit others to.alter this document in any way or remove this Legal Notice from the attac
18、hed standard;.sell this document without authorization from CSA; or.make an electronic copy of this document.If you do not agree with any of the terms and conditions contained in this Legal Notice, you may not load or use this document ormake any copies of the contents hereof, and if you do make suc
19、h copies, you are required to destroy them immediately. Use of thisdocument constitutes your acceptance of the terms and conditions of this Legal Notice.The Canadian Standards Association (CSA),under whose auspices this National Standard hasbeen produced, was chartered in 1919 andaccredited by the S
20、tandards Council of Canadato the National Standards system in 1973. It is anot-for-profit, nonstatutory, voluntary membershipassociation engaged in standards development andcertification activities.CSA standards reflect a national consensus ofproducers and users including manufacturers,consumers, re
21、tailers, unions and professionalorganizations, and governmental agencies. Thestandards are used widely by industry and commerceand often adopted by municipal, provincial, andfederal governments in their regulations, particularlyin the fields of health, safety, building andconstruction, and the envir
22、onment.Individuals, companies, and associations acrossCanada indicate their support for CSAs standardsdevelopment by volunteering their time and skillsto CSA Committee work and supporting theAssociations objectives through sustainingmemberships. The more than 7000 committeevolunteers and the 2000 su
23、staining membershipstogether form CSAs total membership from whichits Directors are chosen. Sustaining membershipsrepresent a major source of income for CSAsstandards development activities.The Association offers certification and testingservices in support of and as an extension to itsstandards dev
24、elopment activities. To ensure theintegrity of its certification process, the Associationregularly and continually audits and inspects productsthat bear the CSA Mark.In addition to its head office and laboratorycomplex in Toronto, CSA has regional branch officesin major centres across Canada and ins
25、pection andtesting agencies in eight countries. Since 1919, theAssociation has developed the necessary expertise tomeet its corporate mission: CSA is an independentservice organization whose mission is to provide anopen and effective forum for activities facilitating theexchange of goods and service
26、s through the use ofstandards, certification and related services to meetnational and international needs.For further information on CSA services, write toCanadian Standards Association5060 Spectrum Way, Suite 100Mississauga, Ontario, L4W 5N6CanadaThe Standards Council of Canada (SCC) is thecoordina
27、ting body of the National StandardsSystem, a coalition of independent, autonomousorganizations working towards the furtherdevelopment and improvement of voluntarystandardization in the national interest.The principal objects of the SCC are to fosterand promote voluntary standardization as a meansof
28、advancing the national economy, benefiting thehealth, safety, and welfare of the public, assistingand protecting the consumer, facilitating domesticand international trade, and furthering internationalcooperation in the field of standards.A National Standard of Canada (NSC) is a standardprepared or
29、reviewed by an accredited StandardsDevelopment Organization (SDO) and approvedby the SCC according to the requirements of CAN-P-2.Approval does not refer to the technical content of thestandard; this remains the continuing responsibility ofthe SDO. An NSC reflects a consensus of a number ofcapable i
30、ndividuals whose collective interests provide,to the greatest practicable extent, a balance ofrepresentation of general interests, producers,regulators, users (including consumers), and otherswith relevant interests, as may be appropriate to thesubject in hand. It normally is a standard which iscapa
31、ble of making a significant and timely contributionto the national interest.Those who have a need to apply standards areencouraged to use NSCs. These standards are subjectto periodic review. Users of NSCs are cautionedto obtain the latest edition from the SDO whichpublishes the standard.The responsi
32、bility for approving standards asNational Standards of Canada rests with theStandards Council of Canada270 Albert Street, Suite 200Ottawa, Ontario, K1P 6N7CanadaAlthough the intended primary application of this Standard is stated in its Scope, it is importantto note that it remains the responsibilit
33、y of the users to judge its suitability for their particular purpose.Registered trade-mark of Canadian Standards AssociationCette norme est offerte en anglais seulement pour le moment. La CSA publiera la version enfranais ds quelle sera produite par lorganisme rdacteur.Approved byStandards Council o
34、f CanadaNational Standard of CanadaPublished in November 2007 by Canadian Standards AssociationA not-for-profit private sector organization5060 Spectrum Way, Suite 100, Mississauga, Ontario, Canada L4W 5N61-800-463-6727 416-747-4044Visit our Online Store at www.ShopCSA.caCAN/CSA-ISO/IEC 23270:07Info
35、rmation technology Programming languages C#Prepared by International Organization for Standardization/ International Electrotechnical CommissionReviewed byCAN/CSA-ISO/IEC 23270:07 Information technology Programming languages C#November 2007 Canadian Standards Association CSA/3CAN/CSA-ISO/IEC 23270:0
36、7Information technology Programming languages C#CSA PrefaceStandards development within the Information Technology sector is harmonized with international standards development. Through the CSA Technical Committee on Information Technology (TCIT), Canadians serve as the Canadian Advisory Committee (
37、CAC) on ISO/IEC Joint Technical Committee 1 on Information Technology (ISO/IEC JTC1) for the Standards Council of Canada (SCC), the ISO member body for Canada and sponsor of the Canadian National Committee of the IEC. Also, as a member of the International Telecommunication Union (ITU), Canada parti
38、cipates in the International Telegraph and Telephone Consultative Committee (ITU-T).This Standard supersedes CAN/CSA-ISO/IEC 23270:04 (adoption of ISO/IEC 23270:2003). At the time of publication, ISO/IEC 23270:2006 is available from ISO and IEC in English only. CSA will publish the French version wh
39、en it becomes available from ISO and IEC.This International Standard was reviewed by the CSA TCIT under the jurisdiction of the Strategic Steering Committee on Information Technology and deemed acceptable for use in Canada. From time to time, ISO/IEC may publish addenda, corrigenda, etc. The CSA TCI
40、T will review these documents for approval and publication. For a listing, refer to the CSA Information Products catalogue or CSA Info Update or contact a CSA Sales representative. This Standard has been formally approved, without modification, by the Technical Committee and has been approved as a N
41、ational Standard of Canada by the Standards Council of Canada.November 2007 Canadian Standards Association 2007All rights reserved. No part of this publication may be reproduced in any form whatsoever without the prior permission of the publisher. ISO/IEC material is reprinted with permission. Where
42、 the words “this International Standard” appear in the text, they should be interpreted as “this National Standard of Canada”.Inquiries regarding this National Standard of Canada should be addressed toCanadian Standards Association5060 Spectrum Way, Suite 100, Mississauga, Ontario, Canada L4W 5N61-8
43、00-463-6727 416-747-4000www.csa.caTo purchase CSA Standards and related publications, visit CSAs Online Store at www.ShopCSA.ca or call toll-free 1-800-463-6727 or 416-747-4044.Reference numberISO/IEC 23270:2006(E)ISO/IEC 2006INTERNATIONAL STANDARD ISO/IEC23270Second edition2006-09-01Information tec
44、hnology Programming languages C# Technologies de linformation Langages de programmation C# ISO/IEC 23270:2006(E) PDF disclaimer This PDF file may contain embedded typefaces. In accordance with Adobes licensing policy, this file may be printed or viewed but shall not be edited unless the typefaces wh
45、ich are embedded are licensed to and installed on the computer performing the editing. In downloading this file, parties accept therein the responsibility of not infringing Adobes licensing policy. The ISO Central Secretariat accepts no liability in this area. Adobe is a trademark of Adobe Systems I
46、ncorporated. Details of the software products used to create this PDF file can be found in the General Info relative to the file; the PDF-creation parameters were optimized for printing. Every care has been taken to ensure that the file is suitable for use by ISO member bodies. In the unlikely event
47、 that a problem relating to it is found, please inform the Central Secretariat at the address given below. ISO/IEC 2006 All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocop
48、ying and microfilm, without permission in writing from either ISO at the address below or ISOs member body in the country of the requester. ISO copyright office Case postale 56 CH-1211 Geneva 20 Tel. + 41 22 749 01 11 Fax + 41 22 749 09 47 E-mail copyrightiso.org Web www.iso.orgii ISO/IEC 2006 All r
49、ights reservedCAN/CSA-ISO/IEC 23270:07ISO/IEC 23270:2006(E) ISO/IEC 2006 All rights reserved iii Table of Contents Foreword xv Introduction xvi1. Scope . 1 2. Conformance . 3 3. Normative references 5 4. Terms and definitions 7 5. Notational conventions 9 6. Acronyms and abbreviations . 11 7. General description. 13 8. Language overview 15 8.1 Getting started . 15 8.2 Types. 16 8.2.1 Predefined types. 17 8.2.2 Conversions 19 8.2.3 Array types. 20 8.2.4 Type system unification . 22 8.3 Variables and parameters