Learning to use ASP. NET's system. array class

Source: Internet
Author: User
Member:
/* Static Method */array. asreadonly () // The package is read-only (readonlycollection) array. binarysearch () // use the Binary Search Method for search. Sort array first. clear () // array. constrainedcopy () // constraints copy array. convertall () // array. copy () // array. createinstance () // create and initialize array. equals () // array. exists () // determine whether the element of the specified condition exists in array. find () // find the first qualified element array. findall () // search for all elements that match the condition array. findindex () // obtain the index array of the first qualified element. findlast () // find the last qualified element array. findlastindex () // obtain the index array of the last qualified element. foreach () // cyclically operate each element array. indexof () // search for the index array of the First Matching Element. lastindexof () // search for the index array of the last matching element. resize () // set lengtharray. reverse () // flip (one-dimensional array) array. sort () // sort array. trueforall () // whether each element meets the specified condition/* attribute */isfixedsize; // whether it is fixed-size isreadonly; // whether it is read-only issynchronized; // whether it is thread-safe length; // longlength; // length (int64) rank; // syncroot of the array dimension; // synchronize the object/* Method */clone () // clone the shortest copy copyto () // copy to equals () // getenumerator () // gethashcode () // getlength () // getlonglength () with the same Length attribute () // same as the longlength attribute getlowerbound () // obtain the subscript GetType () of the specified dimension // getupperbound () // obtain the supermark getvalue () of the specified dimension // value setvalue () // assign tostring () // aggregate () // accumulate all () // whether all conditions are met any () // whether there is a condition that meets asenumerable () // convert to ienumerable <t> asparallel () // convert to parallelquery for parallel query asparallel () // asqueryable () // convert to iqueryableasqueryable () // average () // average () // cast () // converts the data type to ienumerableconcat () // connects contains () // determines whether it contains count () // defaultifempty () // specify the default value distinct () // remove the repeated elementat () // obtain the element elementatordefault () at the specified position // same as elementat, if the result fails to be obtained, the system returns the default null value, T () // difference set first () // obtains the first element firstordefault () // same as first, however, if the query fails, the system returns the default null value groupby () // group groupjoin () // association group intersect // intersection join () // concatenates last () // get the last element lastordefault () // same as last, but failed to get returns the default null value longcount () // same as count, but returns int64max () // maximum max () // min () // oftype () // filter to ienumerableorderby () // sort orderbydescending () // reverse sort reverse () // flip select () // selecing selectmany () // depth ing sequenceequal () // whether it is equal single () // obtain only unique elements, if the value is not unique or cannot be obtained, the singleordefault () is abnormal. // if the value is not unique, the system returns an exception. If the value is not obtained, the default SKIP () is obtained () // obtain skipwhile () after the specified sequence number // obtain sum () after the specified condition // sum () // take () // obtain the takewhile () before the specified sequence number // obtain the toarray () before the specified condition // generate the array todictionary () // generate the dictionary <tkey tvalue> tolist () // generate list <t> tolookup () // generate lookup <tkey telement> Union () // union where () // filter zip () // merge </tkey> </T>
Array. asreadonly ():
 
Protected void button#click (Object sender, eventargs e) {int [] narr1 = {11, 22, 33}; // readonlycollection <int> narr2 = array. asreadonly (narr1); // ilist <int> narr2 = array. asreadonly <int> (narr1); ilist <int> narr2 = array. asreadonly (narr1); try {narr2 [0] = 123;} catch (exception ERR) {response. write (err. message);} // The set is read-only. For (INT I = 0; I </int>

 
//...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.