C#集合基础:数组、ArrayList与泛型详解

需积分: 14 2 下载量 88 浏览量 更新于2024-07-26 收藏 1.13MB DOC 举报
C#中的数组是本章学习的重要部分,它是基础的数据结构,用于存储一系列相同类型的元素。在C#中,数组可以是一维、二维甚至多维,包括简单数组和复杂数组。数组申明时需要指定元素类型和大小,例如`int[] myArray = new int[10];`表示创建了一个包含10个整数的数组。 Array类是.NET框架提供的内置类,提供了对数组操作的一些基本功能,如排序、查找等。然而,ArrayList虽然也是数组的一种实现,但它提供了动态扩容的能力,即可以在运行时添加或删除元素,这对于处理不确定大小的数据集合非常方便。 泛型是C#的一大特色,它允许你在编写代码时指定类型参数,从而创建可以处理多种数据类型的通用组件。泛型的主要特征包括类型参数化、类型推断和类型安全。通过泛型类、接口和方法的编写,我们可以创建更灵活且具有类型安全的代码,避免了硬编码类型带来的局限性。 集合接口是.NET框架中定义的一组接口,用于统一描述各种集合类型的行为。常见的接口有ICollection、IEnumerable和IList等,它们提供了诸如添加、删除、遍历等操作。泛型集合如List<T>和Dictionary<TKey, TValue>是实际应用中常用的泛型接口实现。 枚举是另一种重要的数据类型,用于定义一组命名的常量,便于程序理解和管理。它可以提供清晰的文档和易于维护的代码。在本章,通过网吧管理和专业课程管理两个实例,学生将学习如何声明和使用枚举。 本章内容涵盖了数组的基础概念和操作,以及更高级的主题如泛型和集合接口,这些都是C#编程中不可或缺的知识点。通过实例学习,学生能够掌握数组的动态和静态维度,理解ArrayList和Array的区别,掌握泛型的使用及其带来的优势,同时了解接口和抽象类与枚举的异同。掌握这些内容后,学生将对C#中的集合数据结构有全面的认识,为后续编程实践打下坚实的基础。
2014-06-29 上传
相控阵天线讲的深入浅出,很有参考价值 1 Radiation 1 1.1 The Early History of Electricity and Magnetism 1 1.2 James Clerk Maxwell, The Union of Electricity and Magnetism 8 1.3 Radiation by Accelerated Charge 10 1.4 Reactive and Radiating Electromagnetic Fields 18 References 18 2 Antennas 19 2.1 The Early History of Antennas 19 2.1.1 Resonant Electric Circuit 20 2.1.2 Heinrich Hertz: The First Antenna and Radio System 23 2.1.3 Guglielmo Marconi, the Dawn of Wireless Communication 28 vi CONTENTS 2.1.4 After the First Transatlantic Transmission 35 2.1.5 Directivity 40 2.2 Antenna Developments During the First World War 44 2.3 Antenna Developments in Between the Wars 47 2.3.1 Broadcasting 47 2.3.2 Microwaves 48 2.4 Antenna Developments During the Second World War 50 2.4.1 Radar 50 2.4.2 Other Antenna Developments 60 2.5 Post-War Antenna Developments 72 2.5.1 Frequency Independent Antennas 73 2.5.2 Helical Antenna 74 2.5.3 Microstrip Patch Antenna 75 2.5.4 Phased Array Antenna 76 References 80 3 Antenna Parameters 83 3.1 Radiation Pattern 83 3.1.1 Field Regions 84 3.1.2 Three-Dimensional Radiation Pattern 87 3.1.3 Planar Cuts 91 3.1.4 Power Patterns and Logarithmic Scale 96 3.1.5 Directivity and Gain 98 3.1.6 Reciprocity 101 3.1.7 Antenna Beamwidth 102 3.2 Antenna Impedance and Bandwidth 103 3.3 Polarisation 107 3.3.1 Elliptical Polarisation 107 3.3.2 Circular Polarisation 109 3.3.3 Linear Polarisation 110 3.3.4 Axial Ratio 110 3.4 Antenna Effective Area and Vector Effective Length 112 3.4.1 Effective Area 112 3.4.2 Vector Effective Length 114 3.5 Radio Equation 115 3.6 Radar Equation 117 3.6.1 Radar Cross-Section 118 References 120 CONTENTS vii 4 The Linear Broadside Array Antenna 123 4.1 A Linear Array of Non-Isotropic Point-Source Radiators 123 4.2 Plane Waves 124 4.3 Received Signal 126 4.4 Array Factor 131 4.5 Side Lobes and Grating Lobes 131 4.5.1 First Side-Lobe Level 131 4.5.2 Grating Lobes 132 4.6 Amplitude Taper 133 References 135 5 Design of a 4-Element, Linear, Broadside, Microstrip Patch Array Antenna 137 5.1 Introduction 137 5.2 Rectangular Microstrip Patch Antenna 138 5.2.1 Cavity Model 138 5.2.2 Input Impedance and Radiated Fields 140 5.2.3 Rectangular Microstrip Patch Antenna Design 144 5.3 Split-T Power Divider 149 5.3.1 Analysis Basic Power Divider 150 5.3.2 Analysis Impedance Transformer 158 5.3.3 Power Divider Scattering Matrix 160 5.3.4 Split-T Power Divider Simulation 161 5.4 Transmission and Reflection Coefficients for a Corporate Fed Array Antenna 163 5.4.1 Two-Element Subarray 165 5.4.2 Four-Element Array 166 5.5 Simulation, Realisation and Measurement 169 5.5.1 Realisation 169 5.5.2 Simulation and Measurement 170 References 174 6 The Linear Endfire Array Antenna 177 6.1 Introduction 177 6.2 Phase Differences 178 6.3 Hansen–Woodyard Endfire Array Antenna 183 6.4 Mutual Coupling 185 6.5 Yagi–Uda Array Antenna 188 6.5.1 Mutual Impedance 189 viii CONTENTS 6.5.2 Radiation 194 6.5.3 Antenna Design 195 References 199 7 The Linear Phased Array Antenna 201 7.1 Linear Phase Taper 201 7.2 Beam Broadening 206 7.3 Grating Lobes and Visible Space 211 7.4 Means of Phase Shifting 212 7.4.1 Phase Shifting by Changing Frequency 214 7.4.2 Phase Shifting by Changing Length 216 7.4.3 Phase Shifting by Changing Permittivity 217 7.4.4 Phase Shifting by Changing Permeability 218 References 219 8 A Frequency Scanned Slotted Waveguide Array Antenna 221 8.1 Slotted Waveguide Array Antenna 221 8.1.1 Resonant Slotted Waveguide Array Antenna 222 8.1.2 Nonresonant Slotted Waveguide Array Antenna 223 8.2 Antenna Design 231 8.3 Validation 232 References 238 9 The Planar Array and Phased Array Antenna 241 9.1 Geometry 241 9.2 Planar Array Antenna 244 9.2.1 Radiation 246 9.2.2 Side Lobe Level 252 9.2.3 Grating Lobes 255 9.3 Planar Phased Array Antenna 258 9.3.1 Radiation 258 9.3.2 Grating Lobes 264 References 267 10 Special Array Antenna Configurations 269 10.1 Conformal Array and Phased Array Antennas 269 10.1.1 Circular Sector Array and Phased Array Antenna 270 10.2 Volume Array and Phased Array Antennas 276 CONTENTS ix 10.3 Sequential Rotation and Phasing 278 10.4 Reactive Loading 286 10.4.1 Theory 288 10.4.2 Circular Dipole Array Antenna 289 References 293 11 Array and Phased Array Antenna Measurement 295 11.1 Input Impedance, Self-Coupling and Mutual Coupling 295 11.2 Radiation Pattern Measurement 298 11.2.1 Far-Field Antenna Measurement Range 299 11.2.2 Anechoic Chamber 300 11.2.3 Compact Antenna Test Range 301 11.2.4 Near-Field Antenna Measurement Range 302 11.3 Scan Element Pattern 303 11.3.1 Mutual Coupling 304 11.3.2 Scan Element Pattern 310 11.3.3 Blind Scan Angles 311 11.4 Waveguide Simulator 311 References 313