1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365
|
<Type Name="Array" FullName="System.Array" FullNameSP="System_Array" Maintainer="ecma">
<TypeSignature Language="ILASM" Value=".class public abstract serializable Array extends System.Object implements System.ICloneable, System.Collections.ICollection, System.Collections.IEnumerable, System.Collections.IList" />
<TypeSignature Language="C#" Value="public abstract class Array : System.Collections.IList, System.ICloneable" />
<MemberOfLibrary>BCL</MemberOfLibrary>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
</AssemblyInfo>
<ThreadingSafetyStatement>All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.</ThreadingSafetyStatement>
<Docs>
<summary>
<para> Serves as the base class for arrays. Provides methods for creating,
copying, manipulating, searching, and sorting arrays.</para>
</summary>
<remarks>
<para>This class is intended to be used as a base class by
language implementations that support arrays. Only the system can derive from
this type: derived classes of <see cref="T:System.Array" /> are not to be created by the developer.</para>
<block subset="none" type="note">
<para>An array is a collection of
identically typed data <paramref name="elements" /> that are accessed and referenced by
sets of integral <paramref name="indices" />. </para>
<para>The <paramref name="rank" /> of an array is the number
of dimensions in the array. Each dimension has its own set of indices. An array
with a rank greater than one can have a different lower
bound and a different number of elements for each dimension. Multidimensional
arrays (i.e. arrays with a rank greater than one) are processed in row-major
order. </para>
<para>The <paramref name="lower bound" /> of a dimension
is the starting index of that dimension. </para>
<para>The <paramref name="length" /> of an array is the total number of elements contained in all of its
dimensions. </para>
<para>A <paramref name="vector" /> is a
one-dimensional array with a <paramref name="lower bound" /> of '0'. </para>
<para>If the implementer creates a derived class of <see cref="T:System.Array" />, expected <see cref="T:System.Array" /> behavior
cannot be guaranteed. For information on array-like objects with increased
functionality, see the <see cref="T:System.Collections.IList" /> interface. For more information regarding the use of arrays versus the use
of collections, see Partition V of the CLI Specification. </para>
</block>
<para>Every specific <see cref="T:System.Array" /> type has three instance methods defined on it.
While some programming languages allow direct access to these methods, they are
primarily intended to be called by the output of compilers based on language
syntax that deals with arrays. </para>
<list type="bullet">
<item>
<term>
<para>
<c>Get</c>: Takes as many <see cref="T:System.Int32" /> arguments as the array
has dimensions and returns the value stored at the given index. It throws a
<see cref="T:System.IndexOutOfRangeException" />
exception for invalid indices. </para>
</term>
</item>
<item>
<term>
<para>
<c>Set</c>: Takes as many <see cref="T:System.Int32" /> arguments as the array
has dimensions, plus one additional argument (the last argument) which has the
same type as an array element. It stores the final value in the specified
index of the array. It throws a <see cref="T:System.IndexOutOfRangeException" />
exception for invalid indices. </para>
</term>
</item>
<item>
<term>
<para>
<c>Address</c>: Takes as many <see cref="T:System.Int32" /> arguments as the
array has dimensions and returns the address of the element at the given index.
It throws a <see cref="T:System.IndexOutOfRangeException" />
exception for invalid indices. </para>
</term>
</item>
</list>
<para>In addition, every specific <see cref="T:System.Array" /> type has a constructor on it that takes as many positive
<see cref="T:System.Int32" />
arguments as the array has dimensions. The arguments specify the
number of elements in each dimension, and a lower bound of 0. Thus, a
two-dimensional array of <see cref="T:System.Int32" /> objects would have a constructor that could be called with
<c>(2, 4)</c> as its arguments to create an array of eight zeros with the first dimension indexed
with 0 and 1 and the second dimension indexed with 0, 1, 2, and 3. </para>
<para>For all specific array types except vectors (i.e. those
permitted to have non-zero lower bounds and those with more than one dimension)
there is an additional constructor. It takes twice as many arguments as the
array has dimensions. The arguments are considered in pairs, with the first of
the pair specifying the lower bound for that dimension and the second specifying
the total number of elements in that dimension. Thus, a two-dimensional array
of <see cref="T:System.Int32" />
objects would also have a constructor that could be called with <c>(-1, 2, 1, 3)</c> as its arguments,
specifying an array of 6 zeros, with the first dimension indexed by -1 and 0,
and the second dimension indexed by 1, 2, and 3. </para>
</remarks>
</Docs>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Collections.IList</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.ICloneable</InterfaceName>
</Interface>
</Interfaces>
<Members>
<Member MemberName="LongLength">
<MemberSignature Language="ILASM" value=".property int32 Length { public hidebysig specialname instance int32 get_LongLength() }" />
<MemberSignature Language="C#" Value="public long LongLength { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Int64</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>
<para>Gets the total number of elements in all the dimensions of the current instance.</para>
</summary>
<value>
<para>A <see cref="T:System.Int64" /> value containing the length of the array.</para>
</value>
<remarks>
<para>This property is read-only.</para>
<para>
<block subset="none" type="note">For additional
information, see <see cref="P:System.Array.Length" />.</block>
</para>
</remarks>
</Docs>
<Excluded>0</Excluded>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName>
</Attribute>
</Attributes></Member>
<Member MemberName="GetEnumerator">
<MemberSignature Language="ILASM" Value=".method public hidebysig virtual class System.Collections.IEnumerator GetEnumerator()" />
<MemberSignature Language="C#" Value="public virtual System.Collections.IEnumerator GetEnumerator ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Collections.IEnumerator</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>
<para>Returns a <see cref="T:System.Collections.IEnumerator" /> for the current instance.</para>
</summary>
<returns>
<para>A <see cref="T:System.Collections.IEnumerator" /> for the current instance.</para>
</returns>
<remarks>
<para>A <see cref="T:System.Collections.IEnumerator" /> grants read-access to the elements of a
<see cref="T:System.Array" />.</para>
<para>
<block subset="none" type="note"> This method is
implemented to support the <see cref="T:System.Collections.IEnumerator" /> interface. For more information regarding the use of an
enumerator, see <see cref="T:System.Collections.IEnumerator" />.</block>
</para>
<block subset="none" type="behaviors">
<para> Initially, the enumerator is positioned before the
first element of the current instance. <see cref="M:System.Collections.IEnumerator.Reset" /> returns the enumerator to this
position. Therefore, after an enumerator is created or after a
<see cref="M:System.Collections.IEnumerator.Reset" />, <see cref="M:System.Collections.IEnumerator.MoveNext" /> is required to be
called to advance the enumerator to the first element of the collection before
reading the value of <see cref="P:System.Collections.IEnumerator.Current" />.</para>
<para> The enumerator is in an invalid state if it
is positioned before the first element or after the last element of the
current instance. Whenever the enumerator is in an invalid state, a call to
<see cref="P:System.Collections.IEnumerator.Current" /> is required to throw a <see cref="T:System.InvalidOperationException" />.</para>
<para>
<see cref="P:System.Collections.IEnumerator.Current" /> returns the same object until either
<see cref="M:System.Collections.IEnumerator.MoveNext" /> or
<see cref="M:System.Collections.IEnumerator.Reset" /> is called.</para>
<para>Once the enumerator of the current instance is moved
immediately past the last element of the current instance, subsequent calls to
<see cref="M:System.Collections.IEnumerator.MoveNext" />
return <see langword="false" />
and the enumerator remains positioned immediately past the last element.</para>
</block>
<block subset="none" type="default">
<para>Multidimensional arrays will be processed in Row-major form. </para>
<para>
<block subset="none" type="note"> For some
multidimensional <see cref="T:System.Array" />
objects, it may be desirable for an enumerator to process them in Column-major form.</block>
</para>
</block>
<para>
<block subset="none" type="overrides">Override this
method to provide read-access to the current instance.</block>
</para>
<para>
<block subset="none" type="usage">Use this method
to iterate over the elements of the current instance.</block>
</para>
</remarks>
<example>
<para>This example demonstrates the <see cref="M:System.Array.GetEnumerator" /> method.</para>
<code lang="C#">using System;
using System.Collections;
public class ArrayGetEnumerator {
public static void Main() {
string[,] strAry = {{"1","one"}, {"2", "two"}, {"3", "three"}};
Console.Write( "The elements of the array are: " );
IEnumerator sEnum = strAry.GetEnumerator();
while ( sEnum.MoveNext() )
Console.Write( " {0}", sEnum.Current );
}
}
</code>
<para>The output is</para>
<c>
<para>The elements of the array are: 1 one 2 two 3 three</para>
</c>
</example>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="IsSynchronized">
<MemberSignature Language="ILASM" Value=".property bool ICollection.IsSynchronized { public hidebysig virtual abstract specialname bool get_ICollection.IsSynchronized() }" />
<MemberSignature Language="C#" Value="public virtual bool IsSynchronized { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Implemented to support the <see cref="T:System.Collections.ICollection" /> interface. [Note: For more information, see <see cref="M:System.Collections.ICollection.IsSynchronized" />.]</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="SyncRoot">
<MemberSignature Language="ILASM" Value=".property object ICollection.SyncRoot { public hidebysig virtual abstract specialname object get_ICollection.SyncRoot() }" />
<MemberSignature Language="C#" Value="public virtual object SyncRoot { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Implemented to support the <see cref="T:System.Collections.ICollection" /> interface. [Note: For more information, see <see cref="M:System.Collections.ICollection.SyncRoot" />.]</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="CopyTo">
<MemberSignature Language="ILASM" Value=".method public hidebysig virtual void CopyTo(class System.Array array, int32 index)" />
<MemberSignature Language="C#" Value="public virtual void CopyTo (Array array, int index);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Array" />
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<summary>
<para> Copies all the elements of the current instance to the
specified one-dimensional array starting at the specified
relative index in the destination array.</para>
</summary>
<param name="array">A one-dimensional <see cref="T:System.Array" /> that is the destination of the elements copied from the current instance.</param>
<param name="index">A <see cref="T:System.Int32" /> that contains the relative zero-based index in <paramref name="array" /> at which copying begins.</param>
<exception cref="T:System.ArgumentNullException">
<paramref name="array" /> is <see langword="null" />.</exception>
<exception cref="T:System.RankException">
<para>The current instance has more than one dimension.</para>
</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="index" /> < 0.</exception>
<exception cref="T:System.ArgumentException">
<para>
<paramref name="array" /> has more than one dimension.</para>
<para> -or-</para>
<para>
<paramref name="index" /> is greater than or equal to <paramref name="array" />.Length.</para>
<para> -or-</para>
<para>The number of elements in the current instance is greater than the available space from <paramref name="index" /> to the end of <paramref name="array" />.</para>
</exception>
<exception cref="T:System.ArrayTypeMismatchException">The type of the current instance cannot be cast automatically to the type of <paramref name="array" />.</exception>
<remarks>
<block subset="none" type="note">
<para>This method is implemented to support the <see cref="T:System.Collections.ICollection" /> interface. If implementing <see cref="T:System.Collections.ICollection" /> is not explicitly required, use <see cref="M:System.Array.Copy(System.Array,System.Array,System.Int32)" />
to avoid an extra indirection.</para>
<para>
<paramref name="index" /> is a
relative index, not
the actual array index. If the index of <paramref name="array" /> is
zero-based, this value is the same as the actual index at which copying begins. If
the lower bound of <paramref name="array" /> is not zero, the value of <paramref name="index" /> is added to
the lower bound of <paramref name="array" /> to get the actual index at which copying begins. For example,
if the lower bound of <paramref name="array" /> is 2 and the value
of <paramref name="index" /> is 1, the copying actually starts
at index 3.</para>
<para>If this method throws an exception while copying, the state of <paramref name="array" />
is undefined.</para>
</block>
<para>
<block subset="none" type="behaviors">As described
above.</block>
</para>
<para>
<block subset="none" type="default">As described
above.</block>
</para>
<para>
<block subset="none" type="overrides">Override this
method to copy elements of the current instance to a specified
array.</block>
</para>
<para>
<block subset="none" type="usage">Use this method to
copy elements of the current instance to a specified array.</block>
</para>
</remarks>
<example>
<para> The following example shows how to copy the elements of one <see cref="T:System.Array" /> into another.</para>
<code lang="C#">using System;
public class ArrayCopyToExample
{
public static void Main()
{
Array aryOne = Array.CreateInstance(typeof(Object), 3);
aryOne.SetValue("one", 0);
aryOne.SetValue("two", 1);
aryOne.SetValue("three", 2);
Array aryTwo = Array.CreateInstance(typeof(Object), 5);
for (int i=0; i < aryTwo.Length; i++)
aryTwo.SetValue(i, i);
Console.WriteLine("The contents of the first array are:");
foreach (object o in aryOne)
Console.Write("{0} ", o);
Console.WriteLine();
Console.WriteLine("The original contents of the second array are:");
foreach (object o in aryTwo)
Console.Write("{0} ", o);
Console.WriteLine();
aryOne.CopyTo(aryTwo, 1);
Console.WriteLine("The new contents of the second array are:");
foreach( object o in aryTwo)
Console.Write("{0} ", o);
}
}
</code>
<para>The output is</para>
<para>
<c>The contents of the first array are:</c>
</para>
<para>
<c> one two three</c>
</para>
<para>
<c>The original contents of the second array are:</c>
</para>
<para>
<c>0 1 2 3 4</c>
</para>
<para>
<c> The new contents of the second array are:</c>
</para>
<para>
<c>0 one two three 4</c>
</para>
</example>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="IsFixedSize">
<MemberSignature Language="ILASM" Value=".property bool IList.IsFixedSize { public hidebysig virtual abstract specialname bool get_IList.IsFixedSize() }" />
<MemberSignature Language="C#" Value="public virtual bool IsFixedSize { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Implemented to support the <see cref="T:System.Collections.IList" /> interface. [Note: For more information, see <see cref="M:System.Collections.IList.IsFixedSize" />.]</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="IsReadOnly">
<MemberSignature Language="ILASM" Value=".property bool IList.IsReadOnly { public hidebysig virtual abstract specialname bool get_IList.IsReadOnly() }" />
<MemberSignature Language="C#" Value="public virtual bool IsReadOnly { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Implemented to support the <see cref="T:System.Collections.IList" /> interface. [Note: For more information, see <see cref="M:System.Collections.IList.IsReadOnly" />.]</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="Clone">
<MemberSignature Language="ILASM" Value=".method public hidebysig virtual object Clone()" />
<MemberSignature Language="C#" Value="public virtual object Clone ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>
<para>Returns a <see cref="T:System.Object" /> that is a copy of the current instance.</para>
</summary>
<returns>
<para>A <see cref="T:System.Object" /> that is a copy of
the current instance.</para>
</returns>
<remarks>
<para>
<block subset="none" type="note"> This method is implemented to support
the <see cref="T:System.ICloneable" />
interface.</block>
</para>
<para>
<block subset="none" type="behaviors">Each of the
elements of the current instance is copied to the clone. If the elements are
reference types, the references are copied. If the elements are value-types, the
values are copied. The clone is of the same type as the current
instance.</block>
</para>
<para>
<block subset="none" type="default">As described above.</block>
</para>
<para>
<block subset="none" type="overrides">Override this method to return a
clone of an array.</block>
</para>
<para>
<block subset="none" type="usage">Use this method to obtain the clone of
an array.</block>
</para>
</remarks>
<example>
<para>This example demonstrates the <see cref="M:System.Array.Clone" /> method.</para>
<code lang="C#">using System;
public class ArrayCloneExample {
public static void Main() {
int[] intAryOrig = { 3, 4, 5 };
//must explicitly convert clones object into an array
int[] intAryClone = (int[]) intAryOrig.Clone();
Console.Write( "The elements of the first array are: " );
foreach( int i in intAryOrig )
Console.Write( "{0,3}", i );
Console.WriteLine();
Console.Write( "The elements of the cloned array are: " );
foreach( int i in intAryClone )
Console.Write( "{0,3}", i );
Console.WriteLine();
//Clear the values of the original array.
Array.Clear( intAryOrig, 0, 3 );
Console.WriteLine( "After clearing the first array," );
Console.Write( "The elements of the first array are: " );
foreach( int i in intAryOrig )
Console.Write( "{0,3}", i );
Console.WriteLine();
Console.Write( "The elements of the cloned array are: " );
foreach( int i in intAryClone )
Console.Write( "{0,3}", i );
}
}
</code>
<para>The output is</para>
<c>
<para>The elements of the first array are: 3 4 5</para>
<para>The elements of the cloned array are: 3 4 5</para>
<para>After clearing the first array,</para>
<para>The elements of the first array are: 0 0 0</para>
<para>The elements of the cloned array are: 3 4 5</para>
</c>
</example>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="CreateInstance">
<MemberSignature Language="ILASM" Value=".method public hidebysig static class System.Array CreateInstance(class System.Type elementType, int32 length)" />
<MemberSignature Language="C#" Value="public static Array CreateInstance (Type elementType, int length);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Array</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="elementType" Type="System.Type" />
<Parameter Name="length" Type="System.Int32" />
</Parameters>
<Docs>
<summary>
<para>Constructs a zero-based, one-dimensional array with the specified number of elements of the specified type.</para>
</summary>
<param name="elementType">The <see cref="T:System.Type" /> of the elements contained in the new <see cref="T:System.Array" /> instance.</param>
<param name="length">A <see cref="T:System.Int32" /> that contains the number of elements contained in the new <see cref="T:System.Array" /> instance.</param>
<returns>
<para>A zero-based, one-dimensional <see cref="T:System.Array" /> object containing <paramref name="length" /> elements of type
<paramref name="elementType" />.</para>
</returns>
<exception cref="T:System.ArgumentNullException">
<paramref name="elementType" /> is <see langword="null" />.</exception>
<exception cref="T:System.ArgumentException">
<paramref name="elementType" /> is not a valid <see cref="T:System.Type" />.</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<paramref name="length" /> < 0.</exception>
<remarks>
<para>Reference-type elements will be set to <see langword="null" />. Value-type elements will be set to zero,
except for <see cref="T:System.Boolean" />
elements, which will be set to
<see langword="false" />.</para>
<para>
<block subset="none" type="note">Unlike most classes, <see cref="T:System.Array" /> provides the <see cref="M:System.Array.CreateInstance(System.Type,System.Int32)" /> method, instead of public constructors, to allow
for late bound access.</block>
</para>
</remarks>
<example>
<para> The following example shows how to create and
initialize a one-dimensional <see cref="T:System.Array" />.</para>
<code lang="C#">using System;
public class ArrayCreateInstanceExample
{
public static void Main()
{
Array intAry = Array.CreateInstance(typeof(int),5);
for (int i=intAry.GetLowerBound(0);i<=intAry.GetUpperBound(0);i++)
intAry.SetValue(i*3,i);
Console.Write("The values of the array are:");
foreach (int i in intAry)
Console.Write("{0} ",i);
}
}
</code>
<para>The output is</para>
<para>
<c>The values of the array are: 0 3 6 9 12</c>
</para>
</example>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="CreateInstance">
<MemberSignature Language="ILASM" Value=".method public hidebysig static class System.Array CreateInstance(class System.Type elementType, int32 length1, int32 length2)" />
<MemberSignature Language="C#" Value="public static Array CreateInstance (Type elementType, int length1, int length2);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Array</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="elementType" Type="System.Type" />
<Parameter Name="length1" Type="System.Int32" />
<Parameter Name="length2" Type="System.Int32" />
</Parameters>
<Docs>
<summary>
<para>Creates a zero-based, two-dimensional array of the specified <see cref="T:System.Type" />
and dimension lengths.</para>
</summary>
<param name="elementType">The <see cref="T:System.Type" /> of the elements contained in the new <see cref="T:System.Array" /> instance. </param>
<param name="length1">A <see cref="T:System.Int32" /> that contains the number of elements contained in the first dimension of the new <see cref="T:System.Array" /> instance. </param>
<param name="length2">A <see cref="T:System.Int32" /> that contains the number of elements contained in the second dimension of the new <see cref="T:System.Array" /> instance. </param>
<returns>
<para>A new zero-indexed, two-dimensional <see cref="T:System.Array" /> instance of <paramref name="elementType" /> objects with the size
<paramref name="length1" /> for the first dimension and <paramref name="length2" />
for the second.</para>
</returns>
<exception cref="T:System.ArgumentNullException">
<paramref name="elementType" /> is <see langword="null" />.</exception>
<exception cref="T:System.ArgumentException">
<paramref name="elementType" /> is not a valid <see cref="T:System.Type" />.</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<para>
<paramref name="length1" /> < 0.</para>
<para>-or-</para>
<para>
<paramref name="length2" /> < 0.</para>
</exception>
<remarks>
<para>Reference-type elements will be set to <see langword="null" />. Value-type elements will be set to zero,
except for <see cref="T:System.Boolean" />
elements, which will be set to
<see langword="false" />.</para>
<para>
<block subset="none" type="note">Unlike most classes, <see cref="T:System.Array" /> provides the
<see cref="M:System.Array.CreateInstance(System.Type,System.Int32)" /> method, instead of public constructors, to allow
for late bound access.</block>
</para>
</remarks>
<example>
<para> The following example shows how to create and
initialize a two-dimensional <see cref="T:System.Array" />.</para>
<code lang="C#">
using System;
public class Create2DArrayExample
{
public static void Main()
{
int i, j;
Array ary = Array.CreateInstance( typeof(int), 5, 3 );
for( i = ary.GetLowerBound(0); i <= ary.GetUpperBound(0); i++ )
{
for( j = ary.GetLowerBound(1); j <= ary.GetUpperBound(1); j++ )
{
ary.SetValue( (10*i + j), i, j );
}
}
Console.WriteLine("The elements of the array are:");
for( i = ary.GetLowerBound(0); i <= ary.GetUpperBound(0); i++)
{
for( j = ary.GetLowerBound(1); j <= ary.GetUpperBound(1); j++)
{
Console.Write("{0, 2} ", ary.GetValue(i, j));
}
Console.WriteLine();
}
}
}
</code>
<para>The output is</para>
<code>The elements of the array are:
0 1 2
10 11 12
20 21 22
30 31 32
40 41 42
</code>
</example>
</Docs>
<Excluded>1</Excluded>
<ExcludedLibrary>ExtendedArray</ExcludedLibrary>
</Member>
<Member MemberName="CreateInstance">
<MemberSignature Language="ILASM" Value=".method public hidebysig static class System.Array CreateInstance(class System.Type elementType, int32 length1, int32 length2, int32 length3)" />
<MemberSignature Language="C#" Value="public static Array CreateInstance (Type elementType, int length1, int length2, int length3);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Array</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="elementType" Type="System.Type" />
<Parameter Name="length1" Type="System.Int32" />
<Parameter Name="length2" Type="System.Int32" />
<Parameter Name="length3" Type="System.Int32" />
</Parameters>
<Docs>
<summary>
<para>Creates a zero-based, three-dimensional array of the
specified <see cref="T:System.Type" /> and dimension lengths.</para>
</summary>
<param name="elementType">The <see cref="T:System.Type" /> of the elements contained in the new <see cref="T:System.Array" /> instance. </param>
<param name="length1">A <see cref="T:System.Int32" /> that contains the number of elements contained in the first dimension of the new <see cref="T:System.Array" /> instance. </param>
<param name="length2">A <see cref="T:System.Int32" /> that contains the number of elements contained in the second dimension of the new <see cref="T:System.Array" /> instance. </param>
<param name="length3">A <see cref="T:System.Int32" /> that contains the number of elements contained in the third dimension of the new <see cref="T:System.Array" /> instance. </param>
<returns>
<para>A new zero-based, three-dimensional <see cref="T:System.Array" /> instance of <paramref name="elementType" /> objects with the size
<paramref name="length1" /> for the first dimension, <paramref name="length2" /> for the second, and
<paramref name="length3" /> for the third.</para>
</returns>
<exception cref="T:System.ArgumentNullException">
<paramref name="elementType" /> is <see langword="null" />.</exception>
<exception cref="T:System.ArgumentException">
<paramref name="elementType" /> is not a valid <see cref="T:System.Type" />.</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<para>
<paramref name="length1" /> < 0.</para>
<para>-or-</para>
<para>
<paramref name="length2" /> < 0.</para>
<para>-or-</para>
<para>
<paramref name="length3" /> < 0.</para>
</exception>
<remarks>
<para>Reference-type elements will be set to <see langword="null" />. Value-type elements will be set to zero,
except for <see cref="T:System.Boolean" />
elements, which will be set to
<see langword="false" />.</para>
<para>
<block subset="none" type="note">Unlike most classes, <see cref="T:System.Array" /> provides the
<see cref="M:System.Array.CreateInstance(System.Type,System.Int32)" /> method, instead of public constructors, to allow
for late bound access.</block>
</para>
</remarks>
<example>
<para> The following example shows how to create and
initialize a three-dimensional <see cref="T:System.Array" />.</para>
<code lang="C#">
using System;
public class Create3DArrayExample
{
public static void Main()
{
int i, j, k;
Array ary = Array.CreateInstance( typeof(int), 2, 4, 3 );
for( i = ary.GetLowerBound(0); i <= ary.GetUpperBound(0); i++ )
{
for( j = ary.GetLowerBound(1); j <= ary.GetUpperBound(1); j++ )
{
for( k = ary.GetLowerBound(2); k <= ary.GetUpperBound(2); k++ )
{
ary.SetValue( (100*i + 10*j + k), i, j, k );
}
}
}
Console.WriteLine("The elements of the array are:");
for( i = ary.GetLowerBound(0); i <= ary.GetUpperBound(0); i++)
{
for( j = ary.GetLowerBound(1); j <= ary.GetUpperBound(1); j++)
{
for( k = ary.GetLowerBound(2); k <= ary.GetUpperBound(2); k++ )
{
Console.Write("{0, 3} ", ary.GetValue(i, j, k));
}
Console.WriteLine();
}
Console.WriteLine();
}
}
}
</code>
<para>The output is</para>
<code>The elements of the array are:
0 1 2
10 11 12
20 21 22
30 31 32
100 101 102
110 111 112
120 121 122
130 131 132
</code>
</example>
</Docs>
<Excluded>1</Excluded>
<ExcludedLibrary>ExtendedArray</ExcludedLibrary>
</Member>
<Member MemberName="CreateInstance">
<MemberSignature Language="ILASM" Value=".method public hidebysig static class System.Array CreateInstance(class System.Type elementType, class System.Int32[] lengths)" />
<MemberSignature Language="C#" Value="public static Array CreateInstance (Type elementType, int[] lengths);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Array</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="elementType" Type="System.Type" />
<Parameter Name="lengths" Type="System.Int32[]" />
</Parameters>
<Docs>
<summary>
<para>Creates a zero-based, multidimensional array of the
specified <see cref="T:System.Type" /> and dimension lengths.</para>
</summary>
<param name="elementType">The <see cref="T:System.Type" /> of the elements contained in the new <see cref="T:System.Array" /> instance. </param>
<param name="lengths">A one-dimensional array of <see cref="T:System.Int32" /> objects that contains the size of each dimension of the new <see cref="T:System.Array" /> instance.</param>
<returns>
<para>A new zero-based, multidimensional <see cref="T:System.Array" /> instance of the
specified <see cref="T:System.Type" /> with the specified length for
each dimension. The <see cref="P:System.Array.Rank" /> of the new instance is equal to
<paramref name="lengths" />.Length.</para>
</returns>
<exception cref="T:System.ArgumentNullException">
<para>
<paramref name="elementType" /> or<paramref name="lengths" /> is <see langword="null" />.</para>
</exception>
<exception cref="T:System.ArgumentException">
<para>
<paramref name="elementType" /> is not a valid <see cref="T:System.Type" />.</para>
<para>-or-</para>
<para>
<paramref name="lengths" />.Length = 0.</para>
</exception>
<exception cref="T:System.ArgumentOutOfRangeException">A value in <paramref name="lengths" /> is less than zero.</exception>
<remarks>
<para>The number of elements in <paramref name="lengths" /> is required to equal the number of
dimensions in the new <see cref="T:System.Array" /> instance. Each element of <paramref name="lengths" /> specifies
the length of the corresponding dimension in the new instance.</para>
<para>Reference-type elements will be set to <see langword="null" />. Value-type elements will be set to zero,
except for <see cref="T:System.Boolean" />
elements, which will be set to
<see langword="false" />.</para>
<para>
<block subset="none" type="note">Unlike most classes, <see cref="T:System.Array" /> provides the
<see cref="M:System.Array.CreateInstance(System.Type,System.Int32)" /> method, instead of public constructors, to allow
for late bound access.</block>
</para>
</remarks>
<example>
<para> The following example shows how to create and initialize a
multidimensional <see cref="T:System.Array" />.</para>
<code lang="C#">
using System;
public class CreateMultiDimArrayExample
{
public static void Main()
{
int i, j, k;
int[] indexAry = {2, 4, 5};
Array ary = Array.CreateInstance( typeof(int), indexAry );
for( i = ary.GetLowerBound(0); i <= ary.GetUpperBound(0); i++ )
{
for( j = ary.GetLowerBound(1); j <= ary.GetUpperBound(1); j++ )
{
for( k = ary.GetLowerBound(2); k <= ary.GetUpperBound(2); k++ )
{
ary.SetValue( (100*i + 10*j + k), i, j, k );
}
}
}
Console.WriteLine("The elements of the array are:");
for( i = ary.GetLowerBound(0); i <= ary.GetUpperBound(0); i++)
{
for( j = ary.GetLowerBound(1); j <= ary.GetUpperBound(1); j++)
{
for( k = ary.GetLowerBound(2); k <= ary.GetUpperBound(2); k++ )
{
Console.Write("{0, 3} ", ary.GetValue(i, j, k));
}
Console.WriteLine();
}
Console.WriteLine();
}
}
}
</code>
<para>The output is</para>
<code>The elements of the array are:
0 1 2 3 4
10 11 12 13 14
20 21 22 23 24
30 31 32 33 34
100 101 102 103 104
110 111 112 113 114
120 121 122 123 124
130 131 132 133 134
</code>
</example>
</Docs>
<Excluded>1</Excluded>
<ExcludedLibrary>ExtendedArray</ExcludedLibrary>
</Member>
<Member MemberName="CreateInstance">
<MemberSignature Language="ILASM" Value=".method public hidebysig static class System.Array CreateInstance(class System.Type elementType, class System.Int32[] lengths, class System.Int32[] lowerBounds)" />
<MemberSignature Language="C#" Value="public static Array CreateInstance (Type elementType, int[] lengths, int[] bounds);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Array</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="elementType" Type="System.Type" />
<Parameter Name="lengths" Type="System.Int32[]" />
<Parameter Name="bounds" Type="System.Int32[]" />
</Parameters>
<Docs>
<summary>
<para>Creates a multidimensional array of the
specified <see cref="T:System.Type" /> and dimension lengths, with the specified lower bounds.</para>
</summary>
<param name="elementType">The <see cref="T:System.Type" /> of the elements contained in the new <see cref="T:System.Array" /> instance. </param>
<param name="lengths">A one-dimensional array of <see cref="T:System.Int32" /> objects that contains the size of each dimension of the new <see cref="T:System.Array" /> instance.</param>
<param name="lowerBounds">A one-dimensional array of <see cref="T:System.Int32" /> objects that contains the lower bound of each dimension of the new <see cref="T:System.Array" /> instance.</param>
<returns>
<para>A new multidimensional <see cref="T:System.Array" /> of the specified <see cref="T:System.Type" /> with
the specified length and lower bound for each dimension.</para>
</returns>
<exception cref="T:System.ArgumentNullException">
<para>
<paramref name="elementType" />, <paramref name="lengths" />, or <paramref name="lowerBounds" /> is <see langword="null" />. </para>
</exception>
<exception cref="T:System.ArgumentException">
<para>
<paramref name="elementType" /> is not a valid <see cref="T:System.Type" />.</para>
<para>-or-</para>
<para>
<paramref name="lengths" />.Length = 0.</para>
<para> -or-</para>
<para>
<paramref name="lengths" /> and <paramref name="lowerBounds" /> do not contain the same number of elements.</para>
</exception>
<exception cref="T:System.ArgumentOutOfRangeException">A value in <paramref name="lengths" /> is less than zero.</exception>
<remarks>
<para>The <paramref name="lengths" /> and <paramref name="lowerBounds" />
are required to have the same number of elements. The number of elements in
<paramref name="lengths" />
equals the number of dimensions in the new <see cref="T:System.Array" /> instance</para>
<para> Each element of <paramref name="lengths" />
specifies the length of the corresponding dimension in the new <see cref="T:System.Array" /> instance.</para>
<para> Each element of <paramref name="lowerBounds" /> specifies the lower bound of the
corresponding dimension in the new <see cref="T:System.Array" /> instance.</para>
<para> Reference-type elements will be set to <see langword="null" />. Value-type elements will be set to zero,
except for <see cref="T:System.Boolean" />
elements, which will be set to
<see langword="false" />.</para>
<para>
<block subset="none" type="note">Unlike most classes, <see cref="T:System.Array" /> provides the
<see cref="M:System.Array.CreateInstance(System.Type,System.Int32)" /> method, instead of public constructors, to allow
for late bound access.</block>
</para>
</remarks>
<example>
<para> The following example shows how to create and
initialize a multidimensional <see cref="T:System.Array" />
with specified low bounds.</para>
<code lang="C#">
using System;
public class MultiDimNonZeroBoundExample
{
public static void Main()
{
int i, j, k;
int[] indexAry = {4, 2, 3};
int[] lowboundAry = {3, 2, 1};
Array ary = Array.CreateInstance( typeof(int), indexAry, lowboundAry );
for( i = ary.GetLowerBound(0); i <= ary.GetUpperBound(0); i++ )
{
for( j = ary.GetLowerBound(1); j <= ary.GetUpperBound(1); j++ )
{
for( k = ary.GetLowerBound(2); k <= ary.GetUpperBound(2); k++ )
{
ary.SetValue( (100*i + 10*j + k), i, j, k );
}
}
}
Console.WriteLine("The elements of the array are:");
for( i = ary.GetLowerBound(0); i <= ary.GetUpperBound(0); i++)
{
for( j = ary.GetLowerBound(1); j <= ary.GetUpperBound(1); j++)
{
for( k = ary.GetLowerBound(2); k <= ary.GetUpperBound(2); k++ )
{
Console.Write("{0, 3} ", ary.GetValue(i, j, k));
}
Console.WriteLine();
}
Console.WriteLine();
}
}
}
</code>
<para>The output is</para>
<code>The elements of the array are:
321 322 323
331 332 333
421 422 423
431 432 433
521 522 523
531 532 533
621 622 623
631 632 633
</code>
</example>
<param name="bounds">To be added.</param>
</Docs>
<Excluded>1</Excluded>
<ExcludedLibrary>ExtendedArray</ExcludedLibrary>
</Member>
<Member MemberName="Copy">
<MemberSignature Language="ILASM" Value=".method public hidebysig static void Copy(class System.Array sourceArray, class System.Array destinationArray, int32 length)" />
<MemberSignature Language="C#" Value="public static void Copy (Array sourceArray, Array destinationArray, int length);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sourceArray" Type="System.Array" />
<Parameter Name="destinationArray" Type="System.Array" />
<Parameter Name="length" Type="System.Int32" />
</Parameters>
<Docs>
<summary>
<para> Copies the specified number of elements from the
specified source array to the specified destination array.</para>
</summary>
<param name="sourceArray">A <see cref="T:System.Array" /> that contains the data to copy.</param>
<param name="destinationArray">A <see cref="T:System.Array" /> that receives the data.</param>
<param name="length">A <see cref="T:System.Int32" /> designating the number of elements to copy, starting with the first element and proceeding in order.</param>
<exception cref="T:System.ArgumentNullException">
<para>
<paramref name="sourceArray" /> or <paramref name="destinationArray" /> is <see langword="null" />.</para>
</exception>
<exception cref="T:System.RankException">
<para>
<paramref name="sourceArray" /> and <paramref name="destinationArray" /> have different ranks.</para>
</exception>
<exception cref="T:System.ArrayTypeMismatchException">
<para>The elements in both arrays are built-in types, and converting from the type of the elements of <paramref name="sourceArray" /> into the type of the elements in <paramref name="destinationArray" /> requires a narrowing conversion.</para>
<para> -or-</para>
<para>Both arrays are built-in types, and one array is a value-type array and the other an array of interface type not implemented by that value-type.</para>
<para> -or-</para>
<para>Both arrays are user-defined value types and are not of the same type.</para>
</exception>
<exception cref="T:System.InvalidCastException">
<para> At least one of the elements in <paramref name="sourceArray" /> is not assignment-compatible with the type of <paramref name="destinationArray" />.</para>
</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<para>
<paramref name="length" /> < 0.</para>
</exception>
<exception cref="T:System.ArgumentException">
<para>
<paramref name="length" /> < <paramref name="sourceArray" />.Length.</para>
<para>-or-</para>
<para>
<paramref name="length " /> < <paramref name="destinationArray" />.Length.</para>
</exception>
<remarks>
<para>This version of <see cref="M:System.Array.Copy(System.Array,System.Array,System.Int32)" /> is equivalent to <see cref="M:System.Array.Copy(System.Array,System.Array,System.Int32)" /> (<paramref name="sourceArray" />, <paramref name="sourceArray" />.GetLowerBound(0), <paramref name="destinationArray" />,
<paramref name="destinationArray" />.GetLowerBound(0), <paramref name="length" />). </para>
<para>If <paramref name="sourceArray" /> and <paramref name="destinationArray" /> are of different
types, <see cref="M:System.Array.Copy(System.Array,System.Array,System.Int32)" /> performs widening conversions on the elements of
<paramref name="sourceArray" /> as necessary before storing the information in
<paramref name="destinationArray" />. Value types will be boxed when being converted to a
<see cref="T:System.Object" />. If the necessary
conversion is a narrowing conversion, a <see cref="T:System.ArrayTypeMismatchException" /> exception is thrown. <block subset="none" type="note">
For information regarding valid conversions performed by this method, see
<see cref="T:System.Convert" />.</block></para>
<para>If an exception is thrown while copying, the state of
<paramref name="destinationArray" /> is undefined. </para>
<para>If <paramref name="sourceArray" /> and <paramref name="destinationArray" /> are the same
array, <see cref="M:System.Array.Copy(System.Array,System.Array,System.Int32)" /> copies the source elements safely to their
destination, as if the copy were done through an intermediate array. </para>
</remarks>
<example>
<para>This example demonstrates the <see cref="M:System.Array.Copy(System.Array,System.Array,System.Int32)" /> method.</para>
<code lang="C#">using System;
public class ArrayCopyExample {
public static void Main() {
int[] intAryOrig = new int[3];
double[] dAryCopy = new double[3];
for ( int i = 0; i < intAryOrig.Length; i++ )
intAryOrig[i] = i+3;
//copy the first 2 elements of the source into the destination
Array.Copy( intAryOrig, dAryCopy, 2);
Console.Write( "The elements of the first array are: " );
for ( int i = 0; i < intAryOrig.Length; i++ )
Console.Write( "{0,3}", intAryOrig[i] );
Console.WriteLine();
Console.Write( "The elements of the copied array are: " );
for ( int i = 0; i < dAryCopy.Length; i++ )
Console.Write( "{0,3}", dAryCopy[i] );
}
}
</code>
<para>The output is</para>
<c>
<para>The elements of the first array are: 3 4 5</para>
<para>The elements of the copied array are: 3 4 0</para>
</c>
</example>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="Copy">
<MemberSignature Language="ILASM" Value=".method public hidebysig static void Copy(class System.Array sourceArray, int32 sourceIndex, class System.Array destinationArray, int32 destinationIndex, int32 length)" />
<MemberSignature Language="C#" Value="public static void Copy (Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sourceArray" Type="System.Array" />
<Parameter Name="sourceIndex" Type="System.Int32" />
<Parameter Name="destinationArray" Type="System.Array" />
<Parameter Name="destinationIndex" Type="System.Int32" />
<Parameter Name="length" Type="System.Int32" />
</Parameters>
<Docs>
<summary>
<para> Copies the specified number of elements from a source
array starting at the specified source index to a destination array
starting at the specified destination index.</para>
</summary>
<param name="sourceArray">The <see cref="T:System.Array" /> that contains the data to copy.</param>
<param name="sourceIndex">A <see cref="T:System.Int32" /> that contains the index in <paramref name="sourceArray" /> from which copying begins.</param>
<param name="destinationArray">The <see cref="T:System.Array" /> that receives the data.</param>
<param name="destinationIndex">A <see cref="T:System.Int32" /> that contains the index in <paramref name="destinationArray" /> at which storing begins.</param>
<param name="length">A <see cref="T:System.Int32" /> that contains the number of elements to copy.</param>
<exception cref="T:System.ArgumentNullException">
<para>
<paramref name="sourceArray" /> or <paramref name="destinationArray" /> is <see langword="null" />.</para>
</exception>
<exception cref="T:System.RankException">
<para>
<paramref name="sourceArray" /> and <paramref name="destinationArray" /> have different ranks.</para>
</exception>
<exception cref="T:System.ArrayTypeMismatchException">
<para>The elements in both arrays are built-in types, and converting from the type of the elements of <paramref name="sourceArray" /> into the type of the elements in <paramref name="destinationArray" /> requires a narrowing conversion.</para>
<para>-or-</para>
<para>Both arrays are built-in types, and one array is a value-type array and the other an array of interface type not implemented by that value-type.</para>
<para>-or-</para>
<para>Both arrays are user-defined value types and are not of the same type.</para>
</exception>
<exception cref="T:System.InvalidCastException">
<para>At least one element in <paramref name="sourceArray" /> is assignment-incompatible with the type of <paramref name="destinationArray" />.</para>
</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<para>
<paramref name="sourceIndex" /> < <paramref name="sourceArray" />.GetLowerBound(0).</para>
<para>-or-</para>
<para>
<paramref name="destinationIndex" /> < <paramref name="destinationArray" />.GetLowerBound(0).</para>
<para>-or-</para>
<para>
<paramref name="length" /> < 0.</para>
</exception>
<exception cref="T:System.ArgumentException">
<para>(<paramref name="sourceIndex" /> + <paramref name="length" /> ) > (<paramref name="sourceArray" />.GetLowerBound(0) + <paramref name="sourceArray" />.Length).</para>
<para>(<paramref name="destinationIndex" /> + <paramref name="length" /> ) > ( <paramref name="destinationArray" />.GetLowerBound(0) + <paramref name="destinationArray" />.Length).</para>
</exception>
<remarks>
<para>If <paramref name="sourceArray" /> and <paramref name="destinationArray" />
are of different types, <see cref="M:System.Array.Copy(System.Array,System.Array,System.Int32)" /> performs widening conversions on the elements of
<paramref name="sourceArray" /> as necessary before storing the information in
<paramref name="destinationArray" />. Value types will be boxed when being converted to a
<see cref="T:System.Object" />. If the necessary
conversion is a narrowing conversion, a <see cref="T:System.ArrayTypeMismatchException" /> exception is thrown. <block subset="none" type="note">
For information regarding valid conversions performed by this method, see
<see cref="T:System.Convert" /> .</block></para>
<para>If an exception is thrown while copying, the state of
<paramref name="destinationArray" /> is undefined. </para>
<para>If <paramref name="sourceArray" /> and <paramref name="destinationArray" />
are the same array, <see cref="M:System.Array.Copy(System.Array,System.Array,System.Int32)" /> copies the source elements safely to their
destination as if the copy were done through an intermediate array. </para>
</remarks>
<example>
<para>This example demonstrates the <see cref="M:System.Array.Copy(System.Array,System.Array,System.Int32)" /> method.</para>
<code lang="C#">using System;
class ArrayCopyExample {
public static void Main() {
int[] intAry = { 0, 10, 20, 30, 40, 50 };
Console.Write( "The elements of the array are: " );
foreach ( int i in intAry )
Console.Write( "{0,3}", i );
Console.WriteLine();
Array.Copy( intAry, 2, intAry, 0, 4 );
Console.WriteLine( "After copying elements 2 through 5 into elements 0 through 4" );
Console.Write( "The elements of the array are: " );
foreach ( int i in intAry )
Console.Write( "{0,3}", i );
Console.WriteLine();
}
}
</code>
<para>The output is</para>
<c>
<para>The elements of the array are: 0 10 20 30 40 50</para>
<para>After copying elements 2 through 5 into elements 0 through 4</para>
<para>The elements of the array are: 20 30 40 50 40 50</para>
</c>
</example>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="Clear">
<MemberSignature Language="ILASM" Value=".method public hidebysig static void Clear(class System.Array array, int32 index, int32 length)" />
<MemberSignature Language="C#" Value="public static void Clear (Array array, int index, int length);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Array" />
<Parameter Name="index" Type="System.Int32" />
<Parameter Name="length" Type="System.Int32" />
</Parameters>
<Docs>
<summary>
<para>Sets the specified range of elements in the
specified <see cref="T:System.Array" /> to zero, false, or to a null reference, depending on the
element type.</para>
</summary>
<param name="array">The <see cref="T:System.Array" /> to clear.</param>
<param name="index">A <see cref="T:System.Int32" /> that contains the index at which clearing starts.</param>
<param name="length">A <see cref="T:System.Int32" /> that contains the number of elements to clear, beginning with <paramref name="index" />.</param>
<exception cref="T:System.ArgumentNullException">
<paramref name="array" /> is <see langword="null" />.</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<para>
<paramref name="index" /> < <paramref name="array" />.GetLowerBound(0).</para>
<para>
<paramref name="length" /> < 0.</para>
<para>
<paramref name="index" /> and <paramref name="length" /> do not specify a valid range in <paramref name="array" /> (i.e. <paramref name="index" /> + <paramref name="length" /> > <paramref name="array" />.GetLowerBound(0) + <paramref name="array" />.Length ).</para>
</exception>
<remarks>
<para>Reference-type elements will be set to
<see langword="null" />. Value-type elements will be set to zero,
except for <see cref="T:System.Boolean" />
elements, which will be set to
<see langword="false" />.</para>
</remarks>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="GetValue">
<MemberSignature Language="ILASM" Value=".method public hidebysig instance object GetValue(class System.Int32[] indices)" />
<MemberSignature Language="C#" Value="public object GetValue (int[] indices);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="indices" Type="System.Int32[]">
<Attributes>
<Attribute>
<AttributeName>System.ParamArray</AttributeName>
</Attribute>
</Attributes>
</Parameter>
</Parameters>
<Docs>
<summary>
<para>Gets the value at the specified position in the
current multidimensional instance.</para>
</summary>
<param name="indices">A one-dimensional array of <see cref="T:System.Int32" /> objects that contains the indices that specify the position of the element in the current instance whose value to get.</param>
<returns>
<para>A <see cref="T:System.Object" /> that contains the value at the specified position in the
current instance.</para>
</returns>
<exception cref="T:System.ArgumentNullException">
<paramref name="indices" /> is <see langword="null" />.</exception>
<exception cref="T:System.ArgumentException">The number of dimensions in the current instance is not equal to the number of elements in <paramref name="indices" />.</exception>
<exception cref="T:System.IndexOutOfRangeException">
<para>At least one element in <paramref name="indices" /> is outside the range of valid indices for the corresponding dimension of the current instance.</para>
</exception>
<remarks>
<para>The number of elements in <paramref name="indices" /> is required to be equal to the number of
dimensions in the current instance. All elements in <paramref name="indices" /> collectively specify the position of the
desired element in the current instance.</para>
<para>
<block subset="none" type="note">Use the <see cref="M:System.Array.GetLowerBound(System.Int32)" /> and
<see cref="M:System.Array.GetUpperBound(System.Int32)" /> methods to determine whether any of the values in
<paramref name="indices" /> are out of
bounds.</block>
</para>
</remarks>
</Docs>
<Excluded>1</Excluded>
<ExcludedLibrary>ExtendedArray</ExcludedLibrary>
</Member>
<Member MemberName="GetValue">
<MemberSignature Language="ILASM" Value=".method public hidebysig instance object GetValue(int32 index)" />
<MemberSignature Language="C#" Value="public object GetValue (int index);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<summary>
<para> Gets the value at the specified position in the current one-dimensional
instance.</para>
</summary>
<param name="index">A <see cref="T:System.Int32" /> that contains the position of the value to get from the current instance.</param>
<returns>
<para>A <see cref="T:System.Object" /> that contains the value at the specified position in the current
instance.</para>
</returns>
<exception cref="T:System.ArgumentException">The current instance has more than one dimension.</exception>
<exception cref="T:System.IndexOutOfRangeException">
<para>
<paramref name="index" /> is outside the range of valid indices for the current instance.</para>
</exception>
<remarks>
<para>
<block subset="none" type="note">Use the <see cref="M:System.Array.GetLowerBound(System.Int32)" /> and
<see cref="M:System.Array.GetUpperBound(System.Int32)" /> methods to determine
whether <paramref name="index" /> is out of bounds.</block>
</para>
</remarks>
<example>
<para>This example demonstrates the <see cref="M:System.Array.GetValue(System.Int32[])" /> method.</para>
<code lang="C#">using System;
public class ArrayGetValueExample {
public static void Main() {
String[] strAry = { "one", "two", "three", "four", "five" };
Console.Write( "The elements of the array are: " );
for( int i = 0; i < strAry.Length; i++ )
Console.Write( " '{0}' ", strAry.GetValue( i ) );
}
}
</code>
<para>The output is</para>
<para>
<c>The elements
of the array are: 'one' 'two' 'three' 'four' 'five'</c>
</para>
</example>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="GetValue">
<MemberSignature Language="ILASM" Value=".method public hidebysig instance object GetValue(int32 index1, int32 index2)" />
<MemberSignature Language="C#" Value="public object GetValue (int index1, int index2);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index1" Type="System.Int32" />
<Parameter Name="index2" Type="System.Int32" />
</Parameters>
<Docs>
<summary>
<para>Gets the value at the specified position in the current
two-dimensional instance.</para>
</summary>
<param name="index1">A <see cref="T:System.Int32" /> that contains the first-dimension index of the element in the current instance to get.</param>
<param name="index2">A <see cref="T:System.Int32" /> that contains the second-dimension index of the element in the current instance to get.</param>
<returns>
<para>A <see cref="T:System.Object" /> that contains the value at the specified position in the current
instance.</para>
</returns>
<exception cref="T:System.ArgumentException">The current instance does not have exactly two dimensions.</exception>
<exception cref="T:System.IndexOutOfRangeException">At least one of <paramref name="index1" /> or <paramref name="index2" /> is outside the range of valid indexes for the corresponding dimension of the current instance.</exception>
<remarks>
<para>
<block subset="none" type="note">Use the <see cref="M:System.Array.GetLowerBound(System.Int32)" /> and
<see cref="M:System.Array.GetUpperBound(System.Int32)" /> methods to determine
whether any of the indices are out of bounds.</block>
</para>
</remarks>
</Docs>
<Excluded>1</Excluded>
<ExcludedLibrary>ExtendedArray</ExcludedLibrary>
</Member>
<Member MemberName="GetValue">
<MemberSignature Language="ILASM" Value=".method public hidebysig instance object GetValue(int32 index1, int32 index2, int32 index3)" />
<MemberSignature Language="C#" Value="public object GetValue (int index1, int index2, int index3);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index1" Type="System.Int32" />
<Parameter Name="index2" Type="System.Int32" />
<Parameter Name="index3" Type="System.Int32" />
</Parameters>
<Docs>
<summary>
<para>Gets the value at the specified position in the
current three-dimensional instance.</para>
</summary>
<param name="index1">A <see cref="T:System.Int32" /> that contains the first-dimension index of the element in the current instance to get. </param>
<param name="index2">A <see cref="T:System.Int32" /> that contains the second-dimension index of the element in the current instance to get. </param>
<param name="index3">A <see cref="T:System.Int32" /> that contains the third-dimension index of the element in the current instance to get. </param>
<returns>
<para>A <see cref="T:System.Object" /> that contains the value at the specified position in the
current instance.</para>
</returns>
<exception cref="T:System.ArgumentException">The current instance does not have exactly three dimensions.</exception>
<exception cref="T:System.IndexOutOfRangeException">
<para>At least one of<paramref name="index1" /> or <paramref name="index2" /> or <paramref name="index3" /> is outside the range of valid indexes for the corresponding dimension of the current instance.</para>
</exception>
<remarks>
<para>
<block subset="none" type="note">Use the <see cref="M:System.Array.GetLowerBound(System.Int32)" /> and
<see cref="M:System.Array.GetUpperBound(System.Int32)" /> methods to determine
whether any of the indices are out of bounds.</block>
</para>
</remarks>
</Docs>
<Excluded>1</Excluded>
<ExcludedLibrary>ExtendedArray</ExcludedLibrary>
</Member>
<Member MemberName="SetValue">
<MemberSignature Language="ILASM" Value=".method public hidebysig instance void SetValue(object value, int32 index)" />
<MemberSignature Language="C#" Value="public void SetValue (object value, int index);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<summary>
<para> Sets the value of the element at the specified position
in the current one-dimensional instance.</para>
</summary>
<param name="value">A <see cref="T:System.Object" /> that contains the new value for the specified element.</param>
<param name="index">A <see cref="T:System.Int32" /> that contains the index of the element whose value is to be set.</param>
<exception cref="T:System.ArgumentException">
<para>The current instance has more than one dimension.</para>
<para>-or-</para>
<para>
<paramref name="value" /> is not assignment-compatible with the element type of the current instance.</para>
</exception>
<exception cref="T:System.IndexOutOfRangeException">
<para>
<paramref name="index" /> is outside the range of valid indices for the current instance.</para>
</exception>
<remarks>
<block subset="none" type="note">
<para>Use the <see cref="M:System.Array.GetLowerBound(System.Int32)" /> and <see cref="M:System.Array.GetUpperBound(System.Int32)" /> methods to determine whether
<paramref name="index" /> is out of bounds.</para>
<para> For more
information regarding valid conversions that will be performed by this method,
see <see cref="T:System.Convert" />.</para>
</block>
</remarks>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="SetValue">
<MemberSignature Language="ILASM" Value=".method public hidebysig instance void SetValue(object value, int32 index1, int32 index2)" />
<MemberSignature Language="C#" Value="public void SetValue (object value, int index1, int index2);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
<Parameter Name="index1" Type="System.Int32" />
<Parameter Name="index2" Type="System.Int32" />
</Parameters>
<Docs>
<summary>
<para> Sets the value of the element at the specified position
in the current two-dimensional instance.</para>
</summary>
<param name="value">A <see cref="T:System.Object" /> that contains the new value for the specified element.</param>
<param name="index1">A <see cref="T:System.Int32" /> that contains the first-dimension index of the element in the current instance to set. </param>
<param name="index2">A <see cref="T:System.Int32" /> that contains the second-dimension index of the element in the current instance to set. </param>
<exception cref="T:System.ArgumentException">
<para>The current instance does not have exactly two dimensions.</para>
<para>-or-</para>
<para>
<paramref name="value" /> is not assignment-compatible with the element type of the current instance.</para>
</exception>
<exception cref="T:System.IndexOutOfRangeException">At least one of <paramref name="index1" /> or <paramref name="index2" /> is outside the range of valid indices for the corresponding dimension of the current instance.</exception>
<remarks>
<block subset="none" type="note">
<para>For more information regarding valid conversions that will be performed by
this method, see <see cref="T:System.Convert" />.</para>
<para>Use the <see cref="M:System.Array.GetLowerBound(System.Int32)" /> and <see cref="M:System.Array.GetUpperBound(System.Int32)" /> methods to determine whether any of the indices
are out of bounds.</para>
</block>
</remarks>
</Docs>
<Excluded>1</Excluded>
<ExcludedLibrary>ExtendedArray</ExcludedLibrary>
</Member>
<Member MemberName="SetValue">
<MemberSignature Language="ILASM" Value=".method public hidebysig instance void SetValue(object value, int32 index1, int32 index2, int32 index3)" />
<MemberSignature Language="C#" Value="public void SetValue (object value, int index1, int index2, int index3);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
<Parameter Name="index1" Type="System.Int32" />
<Parameter Name="index2" Type="System.Int32" />
<Parameter Name="index3" Type="System.Int32" />
</Parameters>
<Docs>
<summary>
<para> Sets the value of the element at the
specified position in the current three-dimensional instance.</para>
</summary>
<param name="value">A <see cref="T:System.Object" /> that contains the new value for the specified element. </param>
<param name="index1">A <see cref="T:System.Int32" /> that contains the first-dimension index of the element in the current instance to set. </param>
<param name="index2">A <see cref="T:System.Int32" /> that contains the second-dimension index of the element in the current instance to set. </param>
<param name="index3">A <see cref="T:System.Int32" /> that contains the third-dimension index of the element in the current instance to set. </param>
<exception cref="T:System.ArgumentException">
<para>The current instance does not have exactly three dimensions.</para>
<para>-or-</para>
<para>
<paramref name="value" /> is not assignment-compatible with the element type of the current instance.</para>
</exception>
<exception cref="T:System.IndexOutOfRangeException">At least one of <paramref name="index1" />, <paramref name="index2" />, or <paramref name="index3" /> is outside the range of valid indices for the corresponding dimension of the current instance.</exception>
<remarks>
<block subset="none" type="note">
<para>For more information regarding valid conversions that will be performed by
this method, see <see cref="T:System.Convert" />.</para>
<para>Use the <see cref="M:System.Array.GetLowerBound(System.Int32)" /> and
<see cref="M:System.Array.GetUpperBound(System.Int32)" /> methods to determine whether any of the indices
are out of bounds.</para>
</block>
</remarks>
</Docs>
<Excluded>1</Excluded>
<ExcludedLibrary>ExtendedArray</ExcludedLibrary>
</Member>
<Member MemberName="SetValue">
<MemberSignature Language="ILASM" Value=".method public hidebysig instance void SetValue(object value, class System.Int32[] indices)" />
<MemberSignature Language="C#" Value="public void SetValue (object value, int[] indices);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
<Parameter Name="indices" Type="System.Int32[]">
<Attributes>
<Attribute>
<AttributeName>System.ParamArray</AttributeName>
</Attribute>
</Attributes>
</Parameter>
</Parameters>
<Docs>
<summary>
<para>Sets the value of the element at the specified position in
the current multidimensional instance.</para>
</summary>
<param name="value">A <see cref="T:System.Object" /> that contains the new value for the specified element. </param>
<param name="indices">A one-dimensional array of <see cref="T:System.Int32" /> objects that contains the indices that specify the position of the element in the current instance to set. </param>
<exception cref="T:System.ArgumentNullException">
<paramref name="indices" /> is <see langword="null" />.</exception>
<exception cref="T:System.ArgumentException">
<para>The number of dimensions in the current instance is not equal to the number of elements in <paramref name="indices" />. </para>
<para>-or- </para>
<para>
<paramref name="value" /> is not assignment-compatible with the element type of the current instance.</para>
</exception>
<exception cref="T:System.IndexOutOfRangeException">
<para>At least one element in <paramref name="indices" /> is outside the range of valid indices for the corresponding dimension of the current instance.</para>
</exception>
<remarks>
<para>The number of elements in <paramref name="indices" /> is required to be equal to the number of
dimensions in the current instance. All elements in <paramref name="indices" /> collectively specify the position of the
desired element in the current instance.</para>
<block subset="none" type="note">
<para>For more information regarding valid conversions that will be performed by
this method, see <see cref="T:System.Convert" />.</para>
<para>Use the <see cref="M:System.Array.GetLowerBound(System.Int32)" /> and <see cref="M:System.Array.GetUpperBound(System.Int32)" /> methods to determine whether any
of the values in <paramref name="indices" /> is out of bounds.</para>
</block>
</remarks>
</Docs>
<Excluded>1</Excluded>
<ExcludedLibrary>ExtendedArray</ExcludedLibrary>
</Member>
<Member MemberName="GetUpperBound">
<MemberSignature Language="ILASM" Value=".method public hidebysig instance int32 GetUpperBound(int32 dimension)" />
<MemberSignature Language="C#" Value="public int GetUpperBound (int dimension);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dimension" Type="System.Int32" />
</Parameters>
<Docs>
<summary>
<para>Returns the upper bound of the specified dimension in
the current instance.</para>
</summary>
<param name="dimension">A <see cref="T:System.Int32" /> that contains the zero-based dimension of the current instance whose upper bound is to be determined.</param>
<returns>
<para>A <see cref="T:System.Int32" /> that contains the upper bound of the specified dimension in the
current instance.</para>
</returns>
<exception cref="T:System.IndexOutOfRangeException">
<para>
<paramref name="dimension" /> < 0.</para>
<para>-or-</para>
<para>
<paramref name="dimension" /> is equal to or greater than the <see cref="P:System.Array.Rank" /> property of the current instance.</para>
</exception>
<remarks>
<para>
<block subset="none" type="note">For example, <see cref="M:System.Array.GetUpperBound(System.Int32)" />
(0) returns the upper bound of the first dimension of the current
instance, and <see cref="M:System.Array.GetUpperBound(System.Int32)" />(<see cref="P:System.Array.Rank" /> - 1) returns the upper bound of the last dimension
of the current instance.</block>
</para>
</remarks>
</Docs>
<Excluded>1</Excluded>
<ExcludedLibrary>RuntimeInfrastructure</ExcludedLibrary>
</Member>
<Member MemberName="GetLowerBound">
<MemberSignature Language="ILASM" Value=".method public hidebysig instance int32 GetLowerBound(int32 dimension)" />
<MemberSignature Language="C#" Value="public int GetLowerBound (int dimension);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dimension" Type="System.Int32" />
</Parameters>
<Docs>
<summary>
<para>Returns the lower bound of the specified dimension in
the current instance.</para>
</summary>
<param name="dimension">A <see cref="T:System.Int32" /> that contains the zero-based dimension of the current instance whose lower bound is to be determined.</param>
<returns>
<para>A <see cref="T:System.Int32" /> that contains the lower bound of the specified dimension in the
current instance.</para>
</returns>
<exception cref="T:System.IndexOutOfRangeException">
<para>
<paramref name="dimension" /> < 0.</para>
<para>-or-</para>
<para>
<paramref name="dimension" /> is equal to or greater than the <see cref="P:System.Array.Rank" /> property of the current instance.</para>
</exception>
<remarks>
<para>
<block subset="none" type="note">For example,
<see cref="M:System.Array.GetLowerBound(System.Int32)" /> (0) returns the lower bound of the first
dimension of the current instance, and <see cref="M:System.Array.GetLowerBound(System.Int32)" />(<see cref="P:System.Array.Rank" /> - 1) returns the lower bound of the last dimension of
the current instance.</block>
</para>
</remarks>
</Docs>
<Excluded>1</Excluded>
<ExcludedLibrary>RuntimeInfrastructure</ExcludedLibrary>
</Member>
<Member MemberName="BinarySearch">
<MemberSignature Language="ILASM" Value=".method public hidebysig static int32 BinarySearch(class System.Array array, object value)" />
<MemberSignature Language="C#" Value="public static int BinarySearch (Array array, object value);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Array" />
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<summary>
<para>Searches the specified one-dimensional <see cref="T:System.Array" /> for the specified object.</para>
</summary>
<param name="array">A <see cref="T:System.Array" /> to search for an object.</param>
<param name="value">A <see cref="T:System.Object" /> for which to search, or a null reference. <block subset="none" type="note">A null reference will be considered to compare less than any non-null object, or equal to another null reference.</block></param>
<returns>
<para>A <see cref="T:System.Int32" /> with one of the following values based on the result of the search
operation.</para>
<list type="table">
<listheader>
<term>Return Value</term>
<description> Description</description>
</listheader>
<item>
<term> The index of <paramref name="value" /> in the
array.</term>
<description>
<paramref name="value" /> was found.</description>
</item>
<item>
<term> The bitwise complement of the first element that is larger than
<paramref name="value" />.</term>
<description>
<paramref name="value" /> was not found and the value of at least one element of
<paramref name="array" /> was greater than <paramref name="value" />.</description>
</item>
<item>
<term> The bitwise complement of (<paramref name="array" />.GetLowerBound(0) +
<paramref name="array" />.Length).</term>
<description>
<paramref name="value" /> was not found, and <paramref name="value" /> was greater than the
value of all array elements.</description>
</item>
</list>
<para>
<block subset="none" type="note"> If <paramref name="value" />
is not found, the caller can take the bitwise complement of the return value to
determine the index where value would be found in <paramref name="array" /> if it is sorted
already.</block>
</para>
</returns>
<exception cref="T:System.ArgumentException">
<para>Both <paramref name="value" /> and at least one element of <paramref name="array" /> do not implement the <see cref="T:System.IComparable" /> interface. </para>
<para>-or-</para>
<para>
<paramref name="value" /> is not assignment-compatible with at least one element of <paramref name="array" />. </para>
<para>-or-</para>
<para>
<paramref name="array" />.UpperBound == <see cref="F:System.Int32.MaxValue" />.</para>
</exception>
<exception cref="T:System.ArgumentNullException">
<paramref name="array" /> is <see langword="null" />.</exception>
<exception cref="T:System.RankException">
<para>
<paramref name="array" /> has more than one dimension.</para>
</exception>
<remarks>
<para>This version of <see cref="M:System.Array.BinarySearch(System.Array,System.Object)" /> is equivalent to <see cref="M:System.Array.BinarySearch(System.Array,System.Object)" />(<paramref name="array" />, <paramref name="array" />.GetLowerBound(0),
<paramref name="array" />.Length, <paramref name="value" />,
<see langword="null" />).</para>
<para>
<paramref name="value" /> is compared to each element of
<paramref name="array" /> using the <see cref="T:System.IComparable" /> interface of the element being
compared - or of <paramref name="value" /> if the element being compared does not implement the
interface - until an element with a value greater than or equal to
<paramref name="value" /> is found. If <paramref name="value" /> does not implement the <see cref="T:System.IComparable" /> interface
and is compared to an element that does not implement the <see cref="T:System.IComparable" /> interface,
a <see cref="T:System.ArgumentException" /> exception is thrown. If <paramref name="array" />
is not already sorted, correct results are not guaranteed.</para>
<para>
<block subset="none" type="note"> A null reference
can be compared with any type; therefore,
comparisons with a null reference do not generate exceptions.</block>
</para>
</remarks>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="BinarySearch">
<MemberSignature Language="ILASM" Value=".method public hidebysig static int32 BinarySearch(class System.Array array, int32 index, int32 length, object value)" />
<MemberSignature Language="C#" Value="public static int BinarySearch (Array array, int index, int length, object value);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Array" />
<Parameter Name="index" Type="System.Int32" />
<Parameter Name="length" Type="System.Int32" />
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<summary>
<para>Searches the specified section of the specified
one-dimensional <see cref="T:System.Array" /> for the specified value.</para>
</summary>
<param name="array">A <see cref="T:System.Array" /> to search.</param>
<param name="index">A <see cref="T:System.Int32" /> that contains the index at which searching starts.</param>
<param name="length">A <see cref="T:System.Int32" /> that contains the number of elements to search, beginning with <paramref name="index" /> .</param>
<param name="value">A <see cref="T:System.Object" /> for which to search, or a null reference. <block subset="none" type="note"> A null reference will be considered to compare less than any non-null object, or equal to another null reference.</block></param>
<returns>
<para>A <see cref="T:System.Int32" /> with one of the following values based on the result of the search
operation.</para>
<list type="table">
<listheader>
<term>Return Value</term>
<description>Description</description>
</listheader>
<item>
<term> The index of <paramref name="value" /> in the
array.</term>
<description>
<paramref name="value" /> was found.</description>
</item>
<item>
<term> The bitwise complement of the first element that is larger than
<paramref name="value" />.</term>
<description>
<paramref name="value" /> was not found, and at least one array element in the
range of <paramref name="index" /> to <paramref name="index" /> + <paramref name="length" /> was greater
than <paramref name="value" />.</description>
</item>
<item>
<term> The bitwise complement of (<paramref name="index" /> + <paramref name="length" />).</term>
<description>
<paramref name="value" /> was not found, and <paramref name="value" /> was greater than all
array elements in the range of <paramref name="index" /> to <paramref name="index" /> +
<paramref name="length" />.</description>
</item>
</list>
<para>
<block subset="none" type="note"> If <paramref name="value" />
is not found, the caller can take the bitwise complement of the return value to
determine the index of the array where <paramref name="value" /> would be found in the
range of <paramref name="index" /> to <paramref name="index" /> + <paramref name=" length" /> if <paramref name="array" />
is already sorted.</block>
</para>
</returns>
<exception cref="T:System.ArgumentNullException">
<paramref name="array" /> is <see langword="null" /> .</exception>
<exception cref="T:System.RankException">
<paramref name="array" /> has more than one dimension.</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<para>
<paramref name="index" /> < <paramref name="array" />.GetLowerBound(0).</para>
<para>-or-</para>
<para>
<paramref name="length" /> < 0.</para>
</exception>
<exception cref="T:System.ArgumentException">
<para>
<paramref name="index" /> and <paramref name="length" /> do not specify a valid range in <paramref name="array" /> (i.e. <paramref name="index" /> + <paramref name="length" /> > <paramref name="array" />.GetLowerBound(0) + <paramref name="array" />.Length).</para>
<para>-or-</para>
<para>Either <paramref name="value" /> or at least one element of <paramref name="array" /> does not implement the <see cref="T:System.IComparable" /> interface.</para>
<para> -or-</para>
<para>
<paramref name="value" /> is not assignment-compatible with at least one element of <paramref name="array" />.</para>
<para>-or-</para>
<para>
<paramref name="array" />.UpperBound == <see cref="F:System.Int32.MaxValue" />.</para>
</exception>
<remarks>
<para>This version of <see cref="M:System.Array.BinarySearch(System.Array,System.Object)" /> is equivalent to <see cref="M:System.Array.BinarySearch(System.Array,System.Object)" />(<paramref name="array" />, <paramref name="array" />.GetLowerBound(0),
<paramref name="array" />.Length, <paramref name="value" />,
<see langword="null" />). </para>
<para>
<paramref name="value" /> is compared to each element of <paramref name="array" /> using
the <see cref="T:System.IComparable" /> interface of the element being compared - or of
<paramref name="value" /> if the element being compared does not implement the interface -
until an element with a value greater than or equal to <paramref name="value" /> is found.
If <paramref name="value" /> does not implement the <see cref="T:System.IComparable" /> interface and is compared to an element
that does not implement the <see cref="T:System.IComparable" /> interface, a <see cref="T:System.ArgumentException" />
exception is thrown. If <paramref name="array" /> is not already sorted, correct results
are not guaranteed. </para>
<para>
<block subset="none" type="note"> A null reference can be compared with
any type; therefore, comparisons with a null reference do not generate
exceptions.</block>
</para>
</remarks>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="BinarySearch">
<MemberSignature Language="ILASM" Value=".method public hidebysig static int32 BinarySearch(class System.Array array, object value, class System.Collections.IComparer comparer)" />
<MemberSignature Language="C#" Value="public static int BinarySearch (Array array, object value, System.Collections.IComparer comparer);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Array" />
<Parameter Name="value" Type="System.Object" />
<Parameter Name="comparer" Type="System.Collections.IComparer" />
</Parameters>
<Docs>
<summary>
<para>Searches the specified one-dimensional <see cref="T:System.Array" /> for the specified
value, using the specified <see cref="T:System.Collections.IComparer" />
implementation.</para>
</summary>
<param name="array">A <see cref="T:System.Array" /> to search.</param>
<param name="value">A <see cref="T:System.Object" /> for which to search, or a null reference. <block subset="none" type="note"> A null reference will be considered to compare less than any non-null object, or equal to another null reference.</block></param>
<param name="comparer">
<para>The <see cref="T:System.Collections.IComparer" /> implementation to use when comparing elements. Specify a null reference to use the <see cref="T:System.IComparable" /> implementation of each element.</para>
</param>
<returns>
<para>A <see cref="T:System.Int32" /> with one of the following values based on the result of the search
operation.</para>
<list type="table">
<listheader>
<term>Return Value</term>
<description>Description</description>
</listheader>
<item>
<term> The index of <paramref name="value" /> in the
array.</term>
<description>
<paramref name="value" /> was found.</description>
</item>
<item>
<term> The bitwise complement of the first element that is larger than
<paramref name="value" />.</term>
<description>
<paramref name="value" /> was not found, and at least one array element was
greater than <paramref name="value" />.</description>
</item>
<item>
<term> The bitwise complement of (<paramref name="array" />.GetLowerBound(0) +
<paramref name="array" />.Length).</term>
<description>
<paramref name="value" /> was not found, and <paramref name="value" /> was greater than all
array elements.</description>
</item>
</list>
<para>
<block subset="none" type="note"> If <paramref name="value" />
is not found, the caller can take the bitwise complement of the return value to
determine the index where value would be found in <paramref name="array" /> if it is
already sorted.</block>
</para>
</returns>
<exception cref="T:System.ArgumentException">
<para>
<paramref name="comparer" /> is <see langword="null" />, and both <paramref name="value" /> and at least one element of <paramref name="array" /> do not implement the <see cref="T:System.IComparable" /> interface.</para>
<para>-or-</para>
<para>
<paramref name="comparer" /> is <see langword="null" />, and <paramref name="value" /> is not assignment-compatible with at least one element of <paramref name="array" />.</para>
<para>-or-</para>
<para>
<paramref name="array" />.UpperBound == <see cref="F:System.Int32.MaxValue" />.</para>
</exception>
<exception cref="T:System.ArgumentNullException">
<paramref name="array" /> is <see langword="null" />.</exception>
<exception cref="T:System.RankException">
<paramref name="array" /> has more than one dimension.</exception>
<remarks>
<para>This version of <see cref="M:System.Array.BinarySearch(System.Array,System.Object)" /> is equivalent to <see cref="M:System.Array.BinarySearch(System.Array,System.Object)" />(<paramref name="array" />, <paramref name="array" />.GetLowerBound(0),
<paramref name="array" />.Length, <paramref name="value" />, <paramref name="comparer" />).</para>
<para>
<paramref name="value" /> is compared to each element of
<paramref name="array" /> using <paramref name="comparer" /> until an element with a value greater
than or equal to <paramref name="value" /> is found. If <paramref name="comparer" /> is <see langword="null" />,
the <see cref="T:System.IComparable" /> interface of the element being compared - or of
<paramref name="value" /> if the element being compared does not implement the interface
- is used. If <paramref name="value" /> does not implement
the <see cref="T:System.IComparable" />
interface and is compared to an element that does not implement
the <see cref="T:System.IComparable" />
interface, a <see cref="T:System.ArgumentException" /> exception is thrown. If <paramref name="array" /> is
not already sorted, correct results are not guaranteed.</para>
<para>
<block subset="none" type="note"> A null reference
can be compared with any type; therefore, comparisons
with a null reference do not generate exceptions.</block>
</para>
</remarks>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="BinarySearch">
<MemberSignature Language="ILASM" Value=".method public hidebysig static int32 BinarySearch(class System.Array array, int32 index, int32 length, object value, class System.Collections.IComparer comparer)" />
<MemberSignature Language="C#" Value="public static int BinarySearch (Array array, int index, int length, object value, System.Collections.IComparer comparer);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Array" />
<Parameter Name="index" Type="System.Int32" />
<Parameter Name="length" Type="System.Int32" />
<Parameter Name="value" Type="System.Object" />
<Parameter Name="comparer" Type="System.Collections.IComparer" />
</Parameters>
<Docs>
<summary>
<para>Searches the specified section of the specified
one-dimensional <see cref="T:System.Array" /> for the specified value, using the
specified <see cref="T:System.Collections.IComparer" />
implementation.</para>
</summary>
<param name="array">A <see cref="T:System.Array" /> to search.</param>
<param name="index">A <see cref="T:System.Int32" /> that contains the index at which searching starts. </param>
<param name="length">A <see cref="T:System.Int32" /> that contains the number of elements to search, beginning with <paramref name="index" /> . </param>
<param name="value">A <see cref="T:System.Object" /> for which to search, or a null reference. <block subset="none" type="note"> A null reference will be considered to compare less than any non-null object, or equal to another null reference.</block></param>
<param name="comparer">
<para>The <see cref="T:System.Collections.IComparer" /> implementation to use when comparing elements. Specify a null reference to use the <see cref="T:System.IComparable" /> implementation of each element.</para>
</param>
<returns>
<para>A <see cref="T:System.Int32" /> with one of the following values based on the result of the search
operation.</para>
<list type="table">
<listheader>
<term>Return Value</term>
<description>Description</description>
</listheader>
<item>
<term> The index of <paramref name="value" /> in the
array.</term>
<description>
<paramref name="value" /> was found.</description>
</item>
<item>
<term> The bitwise complement of the first element that is larger than
<paramref name="value" />.</term>
<description>
<paramref name="value" /> was not found, and at least one array element in the
range of <paramref name="index" /> to <paramref name="index" /> + <paramref name="length" /> was greater
than <paramref name="value" />.</description>
</item>
<item>
<term> The bitwise complement of (<paramref name="index" /> + <paramref name="length" />).</term>
<description>
<paramref name="value" /> was not found, and <paramref name="value" /> was greater than all
array elements in the range of <paramref name="index" /> to <paramref name="index" /> +
<paramref name="length" />.</description>
</item>
</list>
<para>
<block subset="none" type="note"> If <paramref name="value" /> is
not found, the caller can take the bitwise complement of the return value to
determine the index of <paramref name="array" /> where <paramref name="value" /> would be found in the
range of <paramref name="index" /> to <paramref name="index" /> + <paramref name="length" /> if <paramref name="array" /> is
already sorted.</block>
</para>
</returns>
<exception cref="T:System.ArgumentNullException">
<paramref name="array" /> is <see langword="null" />.</exception>
<exception cref="T:System.RankException">
<paramref name="array" /> has more than one dimension.</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<para>
<paramref name="index" /> < <paramref name="array" />.GetLowerBound(0).</para>
<para>-or-</para>
<para>
<paramref name="length" /> < 0.</para>
</exception>
<exception cref="T:System.ArgumentException">
<para>
<paramref name="index" /> and <paramref name="length" /> do not specify a valid range in <paramref name="array" /> (i.e. <paramref name="index" /> + <paramref name="length" /> > <paramref name="array" />.GetLowerBound(0) + <paramref name="array" />.Length). </para>
<para>-or- </para>
<para>
<paramref name="comparer" /> is <see langword="null" />, and both <paramref name="value" /> and at least one element of <paramref name="array" /> do not implement the <see cref="T:System.IComparable" /> interface. </para>
<para> -or- </para>
<para>
<paramref name="comparer" /> is <see langword="null" />, and <paramref name="value" /> is not of the same type as the elements of <paramref name="array" />. </para>
<para>-or-</para>
<para>
<paramref name="array" />.UpperBound == <see cref="F:System.Int32.MaxValue" />.</para>
</exception>
<remarks>
<para>
<paramref name="value" /> is compared to each element of
<paramref name="array" /> using <paramref name="comparer" /> until an element with a value greater
than or equal to <paramref name="value" /> is found. If <paramref name="comparer" /> is <see langword="null" />,
the <see cref="T:System.IComparable" /> interface of the element being compared - or of
<paramref name="value" /> if the element being compared does not implement the interface
-- is used. If <paramref name="value" /> does not implement the <see cref="T:System.IComparable" /> interface and is compared to an element
that does not implement the <see cref="T:System.IComparable" /> interface, a <see cref="T:System.ArgumentException" />
exception is thrown. If <paramref name="array" /> is not already
sorted, correct results are not guaranteed.</para>
<para>
<block subset="none" type="note"> A null reference can
be compared with any type; therefore, comparisons with a
null reference do not generate exceptions.</block>
</para>
</remarks>
<example>
<para>This example demonstrates the <see cref="M:System.Array.BinarySearch(System.Array,System.Object)" /> method.</para>
<code lang="C#">using System;
class BinarySearchExample {
public static void Main() {
int[] intAry = { 0, 2, 4, 6, 8 };
Console.WriteLine( "The indices and elements of the array are: ");
for ( int i = 0; i < intAry.Length; i++ )
Console.Write("[{0}]: {1, -5}", i, intAry[i]);
Console.WriteLine();
SearchFor( intAry, 3 );
SearchFor( intAry, 6 );
SearchFor( intAry, 9 );
}
public static void SearchFor( Array ar, Object value ) {
int i = Array.BinarySearch( ar, 0, ar.Length, value, null );
Console.WriteLine();
if ( i > 0 ) {
Console.Write( "The object searched for, {0}, was found ", value );
Console.WriteLine( "at index {1}.", value, i );
}
else if ( ~i == ar.Length ) {
Console.Write( "The object searched for, {0}, was ", value );
Console.Write( "not found,\nand no object in the array had " );
Console.WriteLine( "greater value. " );
}
else {
Console.Write( "The object searched for, {0}, was ", value );
Console.Write( "not found.\nThe next larger object is at " );
Console.WriteLine( "index {0}.", ~i );
}
}
}
</code>
<para>The output is</para>
<c>
<para>The indices and elements of the array are:</para>
<para> [0]:0 [1]:2 [2]:4 [3]:6 [4]:8</para>
<para>The object searched for, 3, was not found.</para>
<para>The next larger object is at index 2.</para>
<para>The object searched for, 6, was found at index 3.</para>
<para>The object searched for, 9, was not found,</para>
<para>and no object in the array had greater value.</para>
</c>
</example>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="IndexOf">
<MemberSignature Language="ILASM" Value=".method public hidebysig static int32 IndexOf(class System.Array array, object value)" />
<MemberSignature Language="C#" Value="public static int IndexOf (Array array, object value);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Array" />
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<summary>
<para>Searches the specified one-dimensional <see cref="T:System.Array" />, returning the
index of the first occurrence of the specified <see cref="T:System.Object" />.</para>
</summary>
<param name="array">A one-dimensional <see cref="T:System.Array" /> to search.</param>
<param name="value">A <see cref="T:System.Object" /> to locate in <paramref name="array" />.</param>
<returns>
<para>A <see cref="T:System.Int32" /> containing the index of the first occurrence of <paramref name="value" /> in
<paramref name="array" />, if found; otherwise, <paramref name="array" />.GetLowerBound(0) - 1. <block subset="none" type="note"> For a vector, if <paramref name="value" /> is not
found, the return value will be -1. This provides the caller with a standard code for a failed search.</block></para>
</returns>
<exception cref="T:System.ArgumentNullException">
<paramref name="array" /> is <see langword="null" />.</exception>
<exception cref="T:System.RankException">
<paramref name="array" /> has more than one dimension.</exception>
<remarks>
<para>This version of <see cref="M:System.Array.IndexOf(System.Array,System.Object)" /> is equivalent to <see cref="M:System.Array.IndexOf(System.Array,System.Object)" />(<paramref name="array" />, <paramref name="value" />, <paramref name="array" />.GetLowerBound(0),
(<paramref name="array" />.Length - <paramref name="array" />.GetLowerBound(0)) ).</para>
<para>The elements will be compared using the semantics of
the <see cref="M:System.Object.Equals(System.Object)" /> method. For user-defined types, <see cref="M:System.Object.Equals(System.Object)" /> is
actually called.</para>
</remarks>
<example>
<para>The following example demonstrates the <see cref="M:System.Array.IndexOf(System.Array,System.Object)" />
method.</para>
<code lang="C#">using System;
public class ArrayIndexOfExample {
public static void Main() {
int[] intAry = { 0, 1, 2, 0, 1 };
Console.Write( "The values of the array are: " );
foreach( int i in intAry )
Console.Write( "{0,5}", i );
Console.WriteLine();
int j = Array.IndexOf( intAry, 1 );
Console.WriteLine( "The first occurrence of 1 is at index {0}", j );
}
}
</code>
<para> The output is</para>
<c>
<para>The values of the array are: 0 1 2 0 1</para>
<para>The first occurrence of 1 is at index 1</para>
</c>
</example>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="IndexOf">
<MemberSignature Language="ILASM" Value=".method public hidebysig static int32 IndexOf(class System.Array array, object value, int32 startIndex)" />
<MemberSignature Language="C#" Value="public static int IndexOf (Array array, object value, int startIndex);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Array" />
<Parameter Name="value" Type="System.Object" />
<Parameter Name="startIndex" Type="System.Int32" />
</Parameters>
<Docs>
<summary>
<para>Searches the specified one-dimensional <see cref="T:System.Array" />, returning the index of the first
occurrence of the specified <see cref="T:System.Object" /> between the specified index and the last element.</para>
</summary>
<param name="array">A one-dimensional <see cref="T:System.Array" /> to search.</param>
<param name="value">A <see cref="T:System.Object" /> to locate in <paramref name="array" />.</param>
<param name="startIndex">A <see cref="T:System.Int32" /> that contains the index at which searching starts.</param>
<returns>
<para>A <see cref="T:System.Int32" /> containing the index of the first occurrence of <paramref name="value" /> in
<paramref name="array" />, within the range <paramref name="startIndex" /> through the last element of
<paramref name="array" />, if found; otherwise,
<paramref name="array" />.GetLowerBound(0) - 1.
<block subset="none" type="note"> For a vector, if <paramref name="value" /> is not
found, the return value will be -1. This provides the caller with a standard code for the failed search.</block></para>
</returns>
<exception cref="T:System.ArgumentNullException">
<para>
<paramref name="array" /> is <see langword="null" />. </para>
</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<para>
<paramref name="startIndex" /> is outside the range of valid indexes for <paramref name="array" />.</para>
</exception>
<exception cref="T:System.RankException">
<paramref name="array" /> has more than one dimension.</exception>
<remarks>
<para>This version of <see cref="M:System.Array.IndexOf(System.Array,System.Object)" /> is equivalent to <see cref="M:System.Array.IndexOf(System.Array,System.Object)" /> (<paramref name="array" />, <paramref name="value" /> ,
<paramref name="startIndex" />, (<paramref name="array" />.Length - <paramref name="startIndex" />)).</para>
<para>The elements will be compared using the semantics of
the <see cref="M:System.Object.Equals(System.Object)" /> method. For user-defined
types, <see cref="M:System.Object.Equals(System.Object)" />
is actually called.</para>
</remarks>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="IndexOf">
<MemberSignature Language="ILASM" Value=".method public hidebysig static int32 IndexOf(class System.Array array, object value, int32 startIndex, int32 count)" />
<MemberSignature Language="C#" Value="public static int IndexOf (Array array, object value, int startIndex, int count);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Array" />
<Parameter Name="value" Type="System.Object" />
<Parameter Name="startIndex" Type="System.Int32" />
<Parameter Name="count" Type="System.Int32" />
</Parameters>
<Docs>
<summary>
<para>Searches the specified one-dimensional <see cref="T:System.Array" />, returning the index of the first
occurrence of the specified <see cref="T:System.Object" /> in the specified range.</para>
</summary>
<param name="array">A one-dimensional <see cref="T:System.Array" /> to search.</param>
<param name="value">A <see cref="T:System.Object" /> to locate in <paramref name="array" />.</param>
<param name="startIndex">A <see cref="T:System.Int32" /> that contains the index at which searching starts. </param>
<param name="count">A <see cref="T:System.Int32" /> that contains the number of elements to search, beginning with <paramref name="startIndex" />.</param>
<returns>
<para>A <see cref="T:System.Int32" /> containing the index of the first occurrence of <paramref name="value" /> in
<paramref name="array" />, within the range <paramref name="startIndex" /> through <paramref name="startIndex" />
+ <paramref name="count" />, if found; otherwise,
<paramref name="array" />.GetLowerBound(0) - 1.
<block subset="none" type="note"> For a vector, if <paramref name="value" /> is not
found, the return value will be -1. This provides the caller with a standard code for the failed search.</block></para>
</returns>
<exception cref="T:System.ArgumentNullException">
<para>
<paramref name="array" /> is <see langword="null" />.</para>
</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<para>
<paramref name="startIndex" /> is outside the range of valid indices for <paramref name="array" />.</para>
<para>-or-</para>
<para>
<paramref name="count" /> < 0.</para>
<para>-or-</para>
<para>The sum of <paramref name="count" /> and <paramref name="startIndex" /> does not specify a valid range in <paramref name="array" /> (i.e. <paramref name="count" /> + <paramref name="startIndex" /> > <paramref name="array" />.GetLowerBound(0) + <paramref name="array" />.Length).</para>
</exception>
<exception cref="T:System.RankException">
<paramref name="array" /> has more than one dimension.</exception>
<remarks>
<para>The elements will be compared using the semantics of
the <see cref="M:System.Object.Equals(System.Object)" /> method. For user-defined
types, <see cref="M:System.Object.Equals(System.Object)" />
is actually called.</para>
</remarks>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="LastIndexOf">
<MemberSignature Language="ILASM" Value=".method public hidebysig static int32 LastIndexOf(class System.Array array, object value)" />
<MemberSignature Language="C#" Value="public static int LastIndexOf (Array array, object value);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Array" />
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<summary>
<para> Searches the specified one-dimensional <see cref="T:System.Array" />, returning the index of the last
occurrence of the specified <see cref="T:System.Object" />.</para>
</summary>
<param name="array">A one-dimensional <see cref="T:System.Array" /> to search.</param>
<param name="value">A <see cref="T:System.Object" /> to locate in <paramref name="array" />.</param>
<returns>
<para>A <see cref="T:System.Int32" /> containing the index of the last occurrence in <paramref name="array" /> of
<paramref name="value" />, if found; otherwise,
<paramref name="array" />.GetLowerBound(0) - 1.
<block subset="none" type="note"> For a vector, if <paramref name="value" /> is not
found, the return value will be -1. This provides the caller with a standard code for the failed search.</block></para>
</returns>
<exception cref="T:System.ArgumentNullException">
<paramref name="array" /> is <see langword="null" /> . </exception>
<exception cref="T:System.RankException">
<paramref name="array" /> has more than one dimension.</exception>
<remarks>
<para>This version of <see cref="M:System.Array.LastIndexOf(System.Array,System.Object)" /> is equivalent to <see cref="M:System.Array.LastIndexOf(System.Array,System.Object)" />(<paramref name="array" />, <paramref name="value" />, (<paramref name="array" />.GetLowerBound(0) + <paramref name="array" />.Length), <paramref name="array" />.Length).</para>
<para>The elements will be compared using the semantics of
the <see cref="M:System.Object.Equals(System.Object)" /> method. For user-defined
types, <see cref="M:System.Object.Equals(System.Object)" />
is actually called.</para>
</remarks>
<example>
<para>The following example demonstrates the <see cref="M:System.Array.LastIndexOf(System.Array,System.Object)" /> method.</para>
<code lang="C#">using System;
public class ArrayLastIndexOfExample {
public static void Main() {
int[] intAry = { 0, 1, 2, 0, 1 };
Console.Write( "The values of the array are: ");
foreach( int i in intAry )
Console.Write( "{0,5}", i );
Console.WriteLine();
int j = Array.LastIndexOf( intAry, 1 );
Console.WriteLine( "The last occurrence of 1 is at index {0}", j );
}
}
</code>
<para> The output is</para>
<c>
<para>The values of the array are: 0 1 2 0 1</para>
<para>The last occurrence of 1 is at index 4</para>
</c>
</example>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="LastIndexOf">
<MemberSignature Language="ILASM" Value=".method public hidebysig static int32 LastIndexOf(class System.Array array, object value, int32 startIndex)" />
<MemberSignature Language="C#" Value="public static int LastIndexOf (Array array, object value, int startIndex);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Array" />
<Parameter Name="value" Type="System.Object" />
<Parameter Name="startIndex" Type="System.Int32" />
</Parameters>
<Docs>
<summary>
<para> Searches the specified one-dimensional <see cref="T:System.Array" />, returning the index of the last
occurrence of the specified <see cref="T:System.Object" /> between the specified index and the first element.</para>
</summary>
<param name="array">A one-dimensional <see cref="T:System.Array" /> to search.</param>
<param name="value">A <see cref="T:System.Object" /> to locate in <paramref name="array" />.</param>
<param name="startIndex">A <see cref="T:System.Int32" /> that contains the index at which searching starts.</param>
<returns>
<para>A <see cref="T:System.Int32" /> containing the index of the last occurrence of <paramref name="value" /> in the range
<paramref name="startIndex" /> through the lower bound of <paramref name="array" />, if found; otherwise,
<paramref name="array" />.GetLowerBound(0) - 1. <block subset="none" type="note"> For a vector, if <paramref name="value" /> is not found, the return value will
be -1. This provides the caller with a standard code for the failed
search.</block></para>
</returns>
<exception cref="T:System.ArgumentNullException">
<para>
<paramref name="array" /> is <see langword="null" />.</para>
</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<para>
<paramref name="startIndex" /> is outside the range of valid indices for <paramref name="array" />.</para>
</exception>
<exception cref="T:System.RankException">
<paramref name="array" /> has more than one dimension.</exception>
<remarks>
<para>This version of <see cref="M:System.Array.LastIndexOf(System.Array,System.Object)" /> is equivalent to <see cref="M:System.Array.LastIndexOf(System.Array,System.Object)" />( <paramref name="array" />, <paramref name="value" />, <paramref name="startIndex" />, (<paramref name="array" />.Length -
<paramref name="startIndex" />) ).</para>
<para>The elements will be compared using the semantics of
the <see cref="M:System.Object.Equals(System.Object)" /> method. For user-defined types,
<see cref="M:System.Object.Equals(System.Object)" /> is actually
called.</para>
</remarks>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="LastIndexOf">
<MemberSignature Language="ILASM" Value=".method public hidebysig static int32 LastIndexOf(class System.Array array, object value, int32 startIndex, int32 count)" />
<MemberSignature Language="C#" Value="public static int LastIndexOf (Array array, object value, int startIndex, int count);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Array" />
<Parameter Name="value" Type="System.Object" />
<Parameter Name="startIndex" Type="System.Int32" />
<Parameter Name="count" Type="System.Int32" />
</Parameters>
<Docs>
<summary>
<para> Searches the specified one-dimensional <see cref="T:System.Array" />, returning the index of the last
occurrence of the specified <see cref="T:System.Object" /> in the specified range.</para>
</summary>
<param name="array">A one-dimensional <see cref="T:System.Array" /> to search.</param>
<param name="value">A <see cref="T:System.Object" /> to locate in <paramref name="array" />.</param>
<param name="startIndex">A <see cref="T:System.Int32" /> that contains the index at which searching starts. </param>
<param name="count">A <see cref="T:System.Int32" /> that contains the number of elements to search, beginning with <paramref name="startIndex" /> . </param>
<returns>
<para>A <see cref="T:System.Int32" /> containing the index of the last occurrence of <paramref name="value" /> in
<paramref name="array" />, within the range <paramref name="startIndex" /> + <paramref name="count" /> through
<paramref name="startIndex" />, if found; otherwise,
<paramref name="array" />.GetLowerBound(0) - 1.
<block subset="none" type="note"> For a vector, if <paramref name="value" /> is not
found, the return value will be -1. This provides the caller with a standard code for the failed search.</block></para>
</returns>
<exception cref="T:System.ArgumentNullException">
<para>
<paramref name="array" /> is <see langword="null" />.</para>
</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<para>
<paramref name="startIndex" /> is outside the range of valid indices for <paramref name="array" />.</para>
<para>-or-</para>
<para>
<paramref name="count" /> < 0.</para>
<para>-or-</para>
<para>
<paramref name="count" /> and <paramref name="startIndex" /> do not specify a valid range in <paramref name="array" />.</para>
</exception>
<exception cref="T:System.RankException">
<paramref name="array" /> has more than one dimension.</exception>
<remarks>
<para>The elements will be compared using the semantics of
the <see cref="M:System.Object.Equals(System.Object)" /> method. For user-defined
types, <see cref="M:System.Object.Equals(System.Object)" />
is actually called.</para>
</remarks>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="Reverse">
<MemberSignature Language="ILASM" Value=".method public hidebysig static void Reverse(class System.Array array)" />
<MemberSignature Language="C#" Value="public static void Reverse (Array array);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Array" />
</Parameters>
<Docs>
<summary>
<para>Reverses the sequence of the elements in the specified one-dimensional
<see cref="T:System.Array" />.</para>
</summary>
<param name="array">The one-dimensional <see cref="T:System.Array" /> to reverse.</param>
<exception cref="T:System.ArgumentNullException">
<paramref name="array" /> is <see langword="null" />.</exception>
<exception cref="T:System.RankException">
<paramref name="array" /> has more than one dimension.</exception>
<remarks>
<para>This version of <see cref="M:System.Array.Reverse(System.Array)" /> is equivalent to <see cref="M:System.Array.Reverse(System.Array)" />(<paramref name="array" />, <paramref name="array" />.GetLowerBound(0),
<paramref name="array" />.Length).</para>
</remarks>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="Reverse">
<MemberSignature Language="ILASM" Value=".method public hidebysig static void Reverse(class System.Array array, int32 index, int32 length)" />
<MemberSignature Language="C#" Value="public static void Reverse (Array array, int index, int length);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Array" />
<Parameter Name="index" Type="System.Int32" />
<Parameter Name="length" Type="System.Int32" />
</Parameters>
<Docs>
<summary>
<para>Reverses the sequence of the elements in the specified
range of the specified one-dimensional <see cref="T:System.Array" />.</para>
</summary>
<param name="array">The one-dimensional <see cref="T:System.Array" /> to reverse.</param>
<param name="index">A <see cref="T:System.Int32" /> that contains the index at which reversing starts.</param>
<param name="length">A <see cref="T:System.Int32" /> that contains the number of elements to reverse.</param>
<exception cref="T:System.ArgumentNullException">
<paramref name="array" /> is <see langword="null" />.</exception>
<exception cref="T:System.RankException">
<paramref name="array" /> is multidimensional.</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<para>
<paramref name="index" /> < <paramref name="array" />.GetLowerBound(0).</para>
<para>
<paramref name="length" /> < 0.</para>
</exception>
<exception cref="T:System.ArgumentException">
<paramref name="index" /> and <paramref name="length" /> do not specify a valid range in <paramref name="array" /> (i.e. <paramref name="index" /> + <paramref name="length" /> > <paramref name="array" />.GetLowerBound(0) + <paramref name="array" />.Length).</exception>
<example>
<para>The following example demonstrates the <see cref="M:System.Array.Reverse(System.Array)" /> method.</para>
<code lang="C#">using System;
public class ArrayReverseExample {
public static void Main() {
string[] strAry = { "one", "two", "three" };
Console.Write( "The elements of the array are:");
foreach( string str in strAry )
Console.Write( " {0}", str );
Array.Reverse( strAry );
Console.WriteLine();
Console.WriteLine( "After reversing the array," );
Console.Write( "the elements of the array are:");
foreach( string str in strAry )
Console.Write( " {0}", str );
}
}
</code>
<para>The output is</para>
<c>
<para>The elements of the array are: one two three</para>
<para>After reversing the array,</para>
<para>the elements of the array are: three two one</para>
</c>
</example>
<remarks>To be added.</remarks>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="Sort">
<MemberSignature Language="ILASM" Value=".method public hidebysig static void Sort(class System.Array array)" />
<MemberSignature Language="C#" Value="public static void Sort (Array array);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Array" />
</Parameters>
<Docs>
<summary>
<para>Sorts the elements of the specified one-dimensional <see cref="T:System.Array" />.</para>
</summary>
<param name="array">A one-dimensional <see cref="T:System.Array" /> to sort.</param>
<exception cref="T:System.ArgumentNullException">
<paramref name="array" /> is <see langword="null" />.</exception>
<exception cref="T:System.RankException">
<paramref name="array" /> has more than one dimension.</exception>
<exception cref="T:System.ArgumentException">One or more elements in <paramref name="array" /> do not implement the <see cref="T:System.IComparable" /> interface.</exception>
<remarks>
<para>This version of <see cref="M:System.Array.Sort(System.Array)" /> is equivalent to <see cref="M:System.Array.Sort(System.Array)" />(<paramref name="array" />, <see langword="null" />, <paramref name="array" />.GetLowerBound(0),
<paramref name="array" />.Length, <see langword="null" />).</para>
<para>Each element of <paramref name="array" /> is
required to implement
the <see cref="T:System.IComparable" /> interface to be capable of comparisons with every other
element in array.</para>
</remarks>
<example>
<para>This example demonstrates the <see cref="M:System.Array.Sort(System.Array)" /> method.</para>
<code lang="C#">using System;
public class ArraySortExample {
public static void Main() {
string[] strAry = { "All's", "well", "that", "ends", "well" };
Console.Write( "The original string array is: " );
foreach ( String str in strAry )
Console.Write( str + " " );
Console.WriteLine();
Array.Sort( strAry );
Console.Write( "The sorted string array is: " );
foreach ( string str in strAry )
Console.Write( str + " " );
}
}
</code>
<para>The output is</para>
<c>
<para>The original string array is: All's well that ends well</para>
<para>The sorted string array is: All's ends that well well</para>
</c>
</example>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="Sort">
<MemberSignature Language="ILASM" Value=".method public hidebysig static void Sort(class System.Array keys, class System.Array items)" />
<MemberSignature Language="C#" Value="public static void Sort (Array keys, Array items);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="keys" Type="System.Array" />
<Parameter Name="items" Type="System.Array" />
</Parameters>
<Docs>
<summary>
<para>Sorts the specified pair of one-dimensional <see cref="T:System.Array" /> objects (one
containing a set of keys and the other containing corresponding items) based on
the keys in the first specified <see cref="T:System.Array" />.</para>
</summary>
<param name="keys">A one-dimensional <see cref="T:System.Array" /> that contains the keys to sort.</param>
<param name="items">
<para>A one-dimensional <see cref="T:System.Array" /> that contains the items that correspond to each of element of <paramref name="keys" />. Specify a null reference to sort only <paramref name="keys" />.</para>
</param>
<exception cref="T:System.ArgumentNullException">
<para>
<paramref name="keys" /> is <see langword="null" />. </para>
</exception>
<exception cref="T:System.RankException">
<para>
<paramref name="keys" /> has more than one dimension.</para>
<para>-or-</para>
<para>
<paramref name="items" /> is not a null reference and has more than one dimension.</para>
</exception>
<exception cref="T:System.ArgumentException">
<para>
<paramref name="items" /> is not a null reference, and <paramref name="keys" />.GetLowerBound(0) does not equal <paramref name="items" />.GetLowerBound(0).</para>
<para>-or-</para>
<para>
<paramref name="items" /> is not a null reference, and <paramref name="keys" />.Length > <paramref name="items" />.Length.</para>
<para>-or-</para>
<para>One or more elements in <paramref name="keys" /> do not implement the <see cref="T:System.IComparable" /> interface.</para>
</exception>
<remarks>
<para> This version of <see cref="M:System.Array.Sort(System.Array)" /> is equivalent to <see cref="M:System.Array.Sort(System.Array)" />(<paramref name="keys" />, <paramref name="items" />, <paramref name="keys" />.GetLowerBound(0), <paramref name="keys" />.Length, <see langword="null" />).</para>
<para> Each key in <paramref name="keys" /> is required to have
a corresponding item in <paramref name="items" />. The sort is performed according to the
order of <paramref name="keys" /> . After a key is repositioned during the sort,
the corresponding item in <paramref name="items" /> is similarly repositioned. Only
<paramref name="keys" />.Length elements of
<paramref name="items" /> are sorted. Therefore,
<paramref name="items" />
is sorted according to the arrangement of the corresponding keys in
<paramref name="keys" />. If
the sort is not successfully completed, the results are unspecified.</para>
<para>Each element of <paramref name="keys" /> is
required to implement
the <see cref="T:System.IComparable" /> interface to be capable of comparisons with every other
element in <paramref name="keys" />.</para>
</remarks>
<example>
<para>This example demonstrates the <see cref="M:System.Array.Sort(System.Array)" /> method.</para>
<code lang="C#">using System;
public class ArraySortExample {
public static void Main() {
string[] strAry = { "All's", "well", "that", "ends", "well" };
int[] intAry = { 3, 4, 0, 1, 2 };
Console.Write( "The original string array is: " );
foreach ( string str in strAry )
Console.Write( str + " " );
Console.WriteLine();
Console.Write( "The key array is: " );
foreach ( int i in intAry )
Console.Write( i + " " );
Console.WriteLine();
Array.Sort( intAry, strAry );
Console.Write( "The sorted string array is: " );
foreach ( string str in strAry )
Console.Write( str + " " );
}
}
</code>
<para>The output is</para>
<c>
<para>The original string array is: All's well that ends well</para>
<para>The key array is: 3 4 0 1 2</para>
<para>The sorted string array is: that ends well All's well</para>
</c>
</example>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="Sort">
<MemberSignature Language="ILASM" Value=".method public hidebysig static void Sort(class System.Array array, int32 index, int32 length)" />
<MemberSignature Language="C#" Value="public static void Sort (Array array, int index, int length);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Array" />
<Parameter Name="index" Type="System.Int32" />
<Parameter Name="length" Type="System.Int32" />
</Parameters>
<Docs>
<summary>
<para>Sorts the elements in the specified range of the
specified one-dimensional <see cref="T:System.Array" />.</para>
</summary>
<param name="array">A one-dimensional <see cref="T:System.Array" /> to sort.</param>
<param name="index">A <see cref="T:System.Int32" /> that contains the index at which sorting starts.</param>
<param name="length">A <see cref="T:System.Int32" /> that contains the number of elements to sort.</param>
<exception cref="T:System.ArgumentNullException">
<paramref name="array" /> is <see langword="null" />. </exception>
<exception cref="T:System.RankException">
<paramref name="array" /> has more than one dimension. </exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<para>
<paramref name="index" /> < <paramref name="array" />.GetLowerBound(0).</para>
<para>-or-</para>
<para>
<paramref name="length" /> < 0.</para>
</exception>
<exception cref="T:System.ArgumentException">
<para>
<paramref name="index" /> and <paramref name="length" /> do not specify a valid range in <paramref name="array" />.</para>
<para>-or-</para>
<para>One or more elements in <paramref name="array" /> do not implement the <see cref="T:System.IComparable" /> interface.</para>
</exception>
<remarks>
<para>This version of <see cref="M:System.Array.Sort(System.Array)" /> is equivalent to <see cref="M:System.Array.Sort(System.Array)" />(<paramref name="array" />,
<see langword="null" /> , <paramref name="index" />, <paramref name="length" />,
<see langword="null" />).</para>
<para>Each element of <paramref name="array" /> is
required to implement
the <see cref="T:System.IComparable" /> interface to be capable of comparisons with every other
element in <paramref name="array" />. If the sort is not successfully completed, the
results are unspecified.</para>
</remarks>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="Sort">
<MemberSignature Language="ILASM" Value=".method public hidebysig static void Sort(class System.Array keys, class System.Array items, int32 index, int32 length)" />
<MemberSignature Language="C#" Value="public static void Sort (Array keys, Array items, int index, int length);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="keys" Type="System.Array" />
<Parameter Name="items" Type="System.Array" />
<Parameter Name="index" Type="System.Int32" />
<Parameter Name="length" Type="System.Int32" />
</Parameters>
<Docs>
<summary>
<para>Sorts the specified ranges of the specified pair of
one-dimensional <see cref="T:System.Array" />
objects (one containing a set of keys and the other containing corresponding
items) based on the keys in the first specified <see cref="T:System.Array" />.</para>
</summary>
<param name="keys">A one-dimensional <see cref="T:System.Array" /> that contains the keys to sort.</param>
<param name="items">A one-dimensional <see cref="T:System.Array" /> that contains the items that correspond to each element in <paramref name="keys" />. Specify a null reference to sort only <paramref name="keys" />.</param>
<param name="index">A <see cref="T:System.Int32" /> that contains the index at which sort begins.</param>
<param name="length">A <see cref="T:System.Int32" /> that contains the number of elements to sort.</param>
<exception cref="T:System.ArgumentNullException">
<para>
<paramref name="keys" /> is <see langword="null" />.</para>
</exception>
<exception cref="T:System.RankException">
<para>
<paramref name="keys" /> has more than one dimension.</para>
<para> -or-</para>
<para>
<paramref name="items" /> is not a null reference and has more than one dimension.</para>
</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<para>
<paramref name="index" /> < <paramref name="keys" />.GetLowerBound(0).</para>
<para>-or-</para>
<para>
<paramref name="length" /> < 0.</para>
</exception>
<exception cref="T:System.ArgumentException">
<para>
<paramref name="items" /> is not a null reference, and <paramref name="keys" />.GetLowerBound(0) does not equal <paramref name="items" />.GetLowerBound(0). </para>
<para>-or- </para>
<para>
<paramref name="index" /> and <paramref name="length" /> do not specify a valid range in <paramref name="key" />. </para>
<para>-or- </para>
<para>
<paramref name="items" /> is not a null reference, and <paramref name="index" /> and <paramref name="length" /> do not specify a valid range in <paramref name="items" />. </para>
<para>-or-</para>
<para>One or more elements in <paramref name="keys" /> do not implement the <see cref="T:System.IComparable" /> interface.</para>
</exception>
<remarks>
<para>This version of <see cref="M:System.Array.Sort(System.Array)" /> is equivalent to <see cref="M:System.Array.Sort(System.Array)" />(<paramref name="keys" />, <paramref name="items" />, <paramref name="index" />, <paramref name="length" />, <see langword="null" />).</para>
<para> Each key in <paramref name="keys" /> is
required to have
a corresponding item in <paramref name="items" />. The sort is performed according to the
order of <paramref name="keys" /> . After a key is repositioned during the sort,
the corresponding item in <paramref name="items" /> is similarly
repositioned. Therefore, <paramref name="items" /> is sorted according to the arrangement of
the corresponding keys in <paramref name="keys" />. If the sort is not successfully
completed, the results are undefined.</para>
<para>Each element of <paramref name="keys" /> is
required to implement the <see cref="T:System.IComparable" /> interface to
be capable of comparisons with every other element in <paramref name="keys" />.</para>
</remarks>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="Sort">
<MemberSignature Language="ILASM" Value=".method public hidebysig static void Sort(class System.Array array, class System.Collections.IComparer comparer)" />
<MemberSignature Language="C#" Value="public static void Sort (Array array, System.Collections.IComparer comparer);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Array" />
<Parameter Name="comparer" Type="System.Collections.IComparer" />
</Parameters>
<Docs>
<summary>
<para>Sorts the elements in the specified one-dimensional <see cref="T:System.Array" /> using the
specified <see cref="T:System.Collections.IComparer" /> implementation.</para>
</summary>
<param name="array">The one-dimensional <see cref="T:System.Array" /> to sort.</param>
<param name="comparer">
<para>The <see cref="T:System.Collections.IComparer" /> implementation to use when comparing elements. Specify a null reference to use the <see cref="T:System.IComparable" /> implementation of each element.</para>
</param>
<exception cref="T:System.ArgumentNullException">
<paramref name="array" /> is <see langword="null" />. </exception>
<exception cref="T:System.RankException">
<paramref name="array" /> has more than one dimension. </exception>
<exception cref="T:System.ArgumentException">
<paramref name="comparer" /> is a null reference, and one or more elements in <paramref name="array" /> do not implement the <see cref="T:System.IComparable" /> interface.</exception>
<remarks>
<para>This version of <see cref="M:System.Array.Sort(System.Array)" /> is equivalent to <see cref="M:System.Array.Sort(System.Array)" />(<paramref name="array" />, <see langword="null" />, <paramref name="array" />.GetLowerBound(0), <paramref name="array" />.Length,
<paramref name="comparer" />).</para>
<para>If <paramref name="comparer" /> is a null reference, each element
of <paramref name="array" /> is required to implement the <see cref="T:System.IComparable" /> interface to be capable of comparisons
with every other element in <paramref name="array" />. If the sort is not successfully
completed, the results are unspecified.</para>
</remarks>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="Sort">
<MemberSignature Language="ILASM" Value=".method public hidebysig static void Sort(class System.Array keys, class System.Array items, class System.Collections.IComparer comparer)" />
<MemberSignature Language="C#" Value="public static void Sort (Array keys, Array items, System.Collections.IComparer comparer);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="keys" Type="System.Array" />
<Parameter Name="items" Type="System.Array" />
<Parameter Name="comparer" Type="System.Collections.IComparer" />
</Parameters>
<Docs>
<summary>
<para>Sorts the specified pair of one-dimensional
<see cref="T:System.Array" /> objects (one
containing a set of keys and the other containing corresponding items) based on
the keys in the first specified <see cref="T:System.Array" /> using the specified <see cref="T:System.Collections.IComparer" /> implementation.</para>
</summary>
<param name="keys">A one-dimensional <see cref="T:System.Array" /> that contains the keys to sort.</param>
<param name="items">
<para>A one-dimensional <see cref="T:System.Array" /> that contains the items that correspond to each element in <paramref name="keys" />. Specify a null reference to sort only <paramref name="keys" />.</para>
</param>
<param name="comparer">
<para>The <see cref="T:System.Collections.IComparer" /> implementation to use when comparing elements. Specify a null reference to use the <see cref="T:System.IComparable" /> implementation of each element.</para>
</param>
<exception cref="T:System.ArgumentNullException">
<para>
<paramref name="keys" /> is <see langword="null" />.</para>
</exception>
<exception cref="T:System.RankException">
<para>
<paramref name="keys" /> has more than one dimension.</para>
<para>-or-</para>
<para>
<paramref name="items" /> is not a null reference and has more than one dimension.</para>
</exception>
<exception cref="T:System.ArgumentException">
<para>
<paramref name="items" /> is not a null reference, and <paramref name="keys" />.GetLowerBound(0) does not equal <paramref name="items" />.GetLowerBound(0). </para>
<para>-or-</para>
<para>
<paramref name="items" /> is not a null reference, and <paramref name="keys" />.Length > <paramref name="items" />.Length.</para>
<para>-or-</para>
<para>
<paramref name="comparer" /> is a null reference, and one or more elements in the <paramref name="keys" /> do not implement the <see cref="T:System.IComparable" /> interface. </para>
</exception>
<remarks>
<para>This version of <see cref="M:System.Array.Sort(System.Array)" /> is equivalent to <see cref="M:System.Array.Sort(System.Array)" />(<paramref name="keys" />, <paramref name="items" />, <paramref name="keys" />.GetLowerBound(0), <paramref name="keys" />.Length, <paramref name="comparer" />).</para>
<para> Each key in <paramref name="keys" /> is required to have
a corresponding item in <paramref name="items" />. The sort is performed according to the order of
<paramref name="keys" /> . After a key is repositioned during the sort, the
corresponding item in <paramref name="items" /> is similarly repositioned. Only
<paramref name="keys" />.Length elements of <paramref name="items" /> are sorted. Therefore,
<paramref name="items" />
is sorted according to the arrangement of the corresponding keys in
<paramref name="keys" />. If
the sort is not successfully completed, the results are unspecified.</para>
<para>If <paramref name="comparer" /> is a null reference, each element
of <paramref name="keys" /> is required to implement the <see cref="T:System.IComparable" /> interface to be capable of comparisons
with every other element in <paramref name="keys" />.</para>
</remarks>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="Sort">
<MemberSignature Language="ILASM" Value=".method public hidebysig static void Sort(class System.Array array, int32 index, int32 length, class System.Collections.IComparer comparer)" />
<MemberSignature Language="C#" Value="public static void Sort (Array array, int index, int length, System.Collections.IComparer comparer);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Array" />
<Parameter Name="index" Type="System.Int32" />
<Parameter Name="length" Type="System.Int32" />
<Parameter Name="comparer" Type="System.Collections.IComparer" />
</Parameters>
<Docs>
<summary>
<para>Sorts the elements in the specified section of the
specified one-dimensional <see cref="T:System.Array" />
using the specified <see cref="T:System.Collections.IComparer" />
implementation.</para>
</summary>
<param name="array">A one-dimensional <see cref="T:System.Array" /> to sort.</param>
<param name="index">A <see cref="T:System.Int32" /> that contains the index at which sorting starts.</param>
<param name="length">A <see cref="T:System.Int32" /> that contains the number of elements to sort.</param>
<param name="comparer">
<para>The <see cref="T:System.Collections.IComparer" /> implementation to use when comparing elements. Specify a null reference to use the <see cref="T:System.IComparable" /> implementation of each element.</para>
</param>
<exception cref="T:System.ArgumentNullException">
<paramref name="array" /> is <see langword="null" />. </exception>
<exception cref="T:System.RankException">
<paramref name="array" /> has more than one dimension. </exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<para>
<paramref name="index" /> < <paramref name="array" />.GetLowerBound(0).</para>
<para>-or-</para>
<para>
<paramref name="length" /> < 0.</para>
</exception>
<exception cref="T:System.ArgumentException">
<para>
<paramref name="index" /> and <paramref name="length" /> do not specify a valid range in <paramref name="array" />.</para>
<para>-or-</para>
<para>
<paramref name="comparer" /> is a null reference, and one or more elements in <paramref name="array" /> do not implement the <see cref="T:System.IComparable" /> interface.</para>
</exception>
<remarks>
<para>This version of <see cref="M:System.Array.Sort(System.Array)" /> is equivalent to <see cref="M:System.Array.Sort(System.Array)" />(<paramref name="array" />, <see langword="null" />, <paramref name="index" />, <paramref name="length" />, <paramref name="comparer" />).</para>
<para>If <paramref name="comparer" /> is a null reference, each element
of <paramref name="array" /> is required to implement the <see cref="T:System.IComparable" /> interface to be capable of comparisons
with every other element in <paramref name="array" />. If the sort is not successfully
completed, the results are unspecified.</para>
</remarks>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="Sort">
<MemberSignature Language="ILASM" Value=".method public hidebysig static void Sort(class System.Array keys, class System.Array items, int32 index, int32 length, class System.Collections.IComparer comparer)" />
<MemberSignature Language="C#" Value="public static void Sort (Array keys, Array items, int index, int length, System.Collections.IComparer comparer);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="keys" Type="System.Array" />
<Parameter Name="items" Type="System.Array" />
<Parameter Name="index" Type="System.Int32" />
<Parameter Name="length" Type="System.Int32" />
<Parameter Name="comparer" Type="System.Collections.IComparer" />
</Parameters>
<Docs>
<summary>
<para>Sorts the specified range of the specified pair of one-dimensional <see cref="T:System.Array" /> objects (one
containing a set of keys and the other containing corresponding items) based on
the keys in the first specified <see cref="T:System.Array" /> using the specified <see cref="T:System.Collections.IComparer" />
implementation.</para>
</summary>
<param name="keys">A one-dimensional <see cref="T:System.Array" /> that contains the keys to sort.</param>
<param name="items">
<para>A one-dimensional <see cref="T:System.Array" /> that contains the items that correspond to each element of <paramref name="keys" />. Specify a null reference to sort only <paramref name="keys" />.</para>
</param>
<param name="index">A <see cref="T:System.Int32" /> that contains the index at which sorting starts.</param>
<param name="length">A <see cref="T:System.Int32" /> that contains the number of elements to sort.</param>
<param name="comparer">
<para>The <see cref="T:System.Collections.IComparer" /> implementation to use when comparing elements. Specify a null reference to use the <see cref="T:System.IComparable" /> implementation of each element.</para>
</param>
<exception cref="T:System.ArgumentNullException">
<para>
<paramref name="keys" /> is <see langword="null" />.</para>
</exception>
<exception cref="T:System.RankException">
<para>
<paramref name="keys" /> has more than one dimension.</para>
<para>-or-</para>
<para>
<paramref name="items" /> is not a null reference and has more than one dimension.</para>
</exception>
<exception cref="T:System.ArgumentOutOfRangeException">
<para>
<paramref name="index" /> < <paramref name="keys" />.GetLowerBound(0).</para>
<para>-or-</para>
<para>
<paramref name="length" /> < 0.</para>
</exception>
<exception cref="T:System.ArgumentException">
<para>
<paramref name="items" /> is not a null reference, and <paramref name="keys" />.GetLowerBound(0) does not equal <paramref name="items" />.GetLowerBound(0). </para>
<para>-or- </para>
<para>
<paramref name="index" /> and <paramref name="length" /> do not specify a valid range in <paramref name="key" />. </para>
<para>-or- </para>
<para>
<paramref name="items" /> is not a null reference, and <paramref name="index" /> and <paramref name="length" /> do not specify a valid range in <paramref name="items" />. </para>
<para>-or-</para>
<para>
<paramref name="comparer" /> is a null reference, and one or more elements in <paramref name="keys" /> do not implement the <see cref="T:System.IComparable" /> interface. </para>
</exception>
<remarks>
<para> Each key in <paramref name="keys" /> is required to have
a corresponding item in <paramref name="items" />. The sort is performed according to the
order of <paramref name="keys" />. After a key is repositioned during the sort,
the corresponding item in <paramref name="items" /> is similarly repositioned. Only
<paramref name="keys" />.Length elements of <paramref name="items" /> will be sorted. Therefore,
<paramref name="items" /> is sorted according to the arrangement of
the corresponding keys in <paramref name="keys" />. If the sort is not successfully
completed, the results are undefined.</para>
<para>If <paramref name="comparer" /> is a null reference, each element
of <paramref name="keys" /> is required to implement the <see cref="T:System.IComparable" /> interface to be capable of comparisons
with every other element in <paramref name="keys" />.</para>
</remarks>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="Initialize">
<MemberSignature Language="ILASM" Value=".method public hidebysig instance void Initialize()" />
<MemberSignature Language="C#" Value="public void Initialize ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>
<para>Initializes every element of the current instance of
value-type objects by calling the
default constructor of that value type.</para>
</summary>
<remarks>
<para> This method cannot be used on reference-type arrays.</para>
<para>If the current instance is not a value-type <see cref="T:System.Array" /> or if the value type does not have a default
constructor, the current instance is not modified.</para>
<para>The current instance can have any lower bound and any number of dimensions.</para>
<para>
<block subset="none" type="note">This method can be used only
on value types that have constructors. </block>
</para>
</remarks>
</Docs>
<Excluded>1</Excluded>
<ExcludedLibrary>RuntimeInfrastructure</ExcludedLibrary>
</Member>
<Member MemberName="Length">
<MemberSignature Language="ILASM" Value=".property int32 Length { public hidebysig specialname instance int32 get_Length() }" />
<MemberSignature Language="C#" Value="public int Length { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>
<para>Gets the total number of elements in all the dimensions
of the current instance.</para>
</summary>
<value>
<para>A <see cref="T:System.Int32" /> that contains the total number of elements in all the dimensions of
the current instance.</para>
</value>
<remarks>
<para>This property is read-only.</para>
</remarks>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="Rank">
<MemberSignature Language="ILASM" Value=".property int32 Rank { public hidebysig specialname instance int32 get_Rank() }" />
<MemberSignature Language="C#" Value="public int Rank { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>
<para>Gets the rank (number of dimensions) of the current instance.</para>
</summary>
<value>
<para>A <see cref="T:System.Int32" /> that contains the rank (number of dimensions) of the current instance.</para>
</value>
<remarks>
<para>This property is read-only.</para>
</remarks>
</Docs>
<Excluded>0</Excluded>
</Member>
<Member MemberName="GetLength">
<MemberSignature Language="C#" Value="public int GetLength (int dimension);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dimension" Type="System.Int32" />
</Parameters>
<Docs>
<summary>To be added.</summary>
<param name="dimension">To be added.</param>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetLongLength">
<MemberSignature Language="C#" Value="public long GetLongLength (int dimension);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Int64</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dimension" Type="System.Int32" />
</Parameters>
<Docs>
<summary>To be added.</summary>
<param name="dimension">To be added.</param>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetValue">
<MemberSignature Language="C#" Value="public object GetValue (long index);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index" Type="System.Int64" />
</Parameters>
<Docs>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<param name="index">To be added.</param>
</Docs>
</Member>
<Member MemberName="GetValue">
<MemberSignature Language="C#" Value="public object GetValue (long index1, long index2);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index1" Type="System.Int64" />
<Parameter Name="index2" Type="System.Int64" />
</Parameters>
<Docs>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<param name="index1">To be added.</param>
<param name="index2">To be added.</param>
</Docs>
</Member>
<Member MemberName="GetValue">
<MemberSignature Language="C#" Value="public object GetValue (long index1, long index2, long index3);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="index1" Type="System.Int64" />
<Parameter Name="index2" Type="System.Int64" />
<Parameter Name="index3" Type="System.Int64" />
</Parameters>
<Docs>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
<param name="index1">To be added.</param>
<param name="index2">To be added.</param>
<param name="index3">To be added.</param>
</Docs>
</Member>
<Member MemberName="SetValue">
<MemberSignature Language="C#" Value="public void SetValue (object value, long index);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
<Parameter Name="index" Type="System.Int64" />
</Parameters>
<Docs>
<summary>To be added.</summary>
<param name="value">To be added.</param>
<remarks>To be added.</remarks>
<param name="index">To be added.</param>
</Docs>
</Member>
<Member MemberName="SetValue">
<MemberSignature Language="C#" Value="public void SetValue (object value, long index1, long index2);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
<Parameter Name="index1" Type="System.Int64" />
<Parameter Name="index2" Type="System.Int64" />
</Parameters>
<Docs>
<summary>To be added.</summary>
<param name="value">To be added.</param>
<remarks>To be added.</remarks>
<param name="index1">To be added.</param>
<param name="index2">To be added.</param>
</Docs>
</Member>
<Member MemberName="SetValue">
<MemberSignature Language="C#" Value="public void SetValue (object value, long index1, long index2, long index3);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
<Parameter Name="index1" Type="System.Int64" />
<Parameter Name="index2" Type="System.Int64" />
<Parameter Name="index3" Type="System.Int64" />
</Parameters>
<Docs>
<summary>To be added.</summary>
<param name="value">To be added.</param>
<remarks>To be added.</remarks>
<param name="index1">To be added.</param>
<param name="index2">To be added.</param>
<param name="index3">To be added.</param>
</Docs>
</Member>
<Member MemberName="CreateInstance">
<MemberSignature Language="C#" Value="public static Array CreateInstance (Type elementType, long[] lengths);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Array</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="elementType" Type="System.Type" />
<Parameter Name="lengths" Type="System.Int64[]">
<Attributes>
<Attribute>
<AttributeName>System.ParamArray</AttributeName>
</Attribute>
</Attributes>
</Parameter>
</Parameters>
<Docs>
<summary>To be added.</summary>
<param name="elementType">To be added.</param>
<param name="lengths">To be added.</param>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetValue">
<MemberSignature Language="C#" Value="public object GetValue (long[] indices);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="indices" Type="System.Int64[]">
<Attributes>
<Attribute>
<AttributeName>System.ParamArray</AttributeName>
</Attribute>
</Attributes>
</Parameter>
</Parameters>
<Docs>
<summary>To be added.</summary>
<param name="indices">To be added.</param>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="SetValue">
<MemberSignature Language="C#" Value="public void SetValue (object value, long[] indices);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
<Parameter Name="indices" Type="System.Int64[]">
<Attributes>
<Attribute>
<AttributeName>System.ParamArray</AttributeName>
</Attribute>
</Attributes>
</Parameter>
</Parameters>
<Docs>
<summary>To be added.</summary>
<param name="value">To be added.</param>
<param name="indices">To be added.</param>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Copy">
<MemberSignature Language="C#" Value="public static void Copy (Array sourceArray, long sourceIndex, Array destinationArray, long destinationIndex, long length);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sourceArray" Type="System.Array" />
<Parameter Name="sourceIndex" Type="System.Int64" />
<Parameter Name="destinationArray" Type="System.Array" />
<Parameter Name="destinationIndex" Type="System.Int64" />
<Parameter Name="length" Type="System.Int64" />
</Parameters>
<Docs>
<summary>To be added.</summary>
<param name="sourceArray">To be added.</param>
<param name="sourceIndex">To be added.</param>
<param name="destinationArray">To be added.</param>
<param name="destinationIndex">To be added.</param>
<param name="length">To be added.</param>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Copy">
<MemberSignature Language="C#" Value="public static void Copy (Array sourceArray, Array destinationArray, long length);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sourceArray" Type="System.Array" />
<Parameter Name="destinationArray" Type="System.Array" />
<Parameter Name="length" Type="System.Int64" />
</Parameters>
<Docs>
<param name="sourceArray">To be added.</param>
<param name="destinationArray">To be added.</param>
<param name="length">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CopyTo">
<MemberSignature Language="C#" Value="public virtual void CopyTo (Array array, long index);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Array" />
<Parameter Name="index" Type="System.Int64" />
</Parameters>
<Docs>
<summary>To be added.</summary>
<param name="array">To be added.</param>
<param name="index">To be added.</param>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
<TypeExcluded>0</TypeExcluded>
</Type>
|