Multidimensional array hauv C# yog dab tsi?
Multidimensional array hauv C# yog dab tsi?

Video: Multidimensional array hauv C# yog dab tsi?

Video: Multidimensional array hauv C# yog dab tsi?
Video: Qhia program vb.net Caculate score 2024, Kaum ib hlis
Anonim

A multi-dimensional array yog ib array nrog ntau tshaj ib theem lossis qhov loj me. Piv txwv li, a 2D array , los yog ob-dimensional array , yog ib array ntawm arrays , lub ntsiab lus nws yog matrix ntawm kab thiab kab (xav txog lub rooj). Ob lub voj voog yog siv rau cov 2D array : ib lub voj rau kab, lwm qhov rau kab.

Ib sab ntawm qhov no, dab tsi yog multidimensional array hauv C #?

C# Multidimensional Arrays Cov multidimensional array tseem hu ua asrectangular arrays hauv C# . Nws tuaj yeem yog ob seem los yog peb seem. Cov ntaub ntawv khaws cia rau hauv daim ntawv tabular (kab * kem) uas tseem hu ua matrix. Tsim multidimensional array , peb yuav tsum siv comma nyob rau hauv lub square brackets.

Ib yam li ntawd, kev siv ntau qhov array yog dab tsi? Multidimensional arrays yog siv kom khaws cov ntaub ntawv hauv daim ntawv matrix -- e.g. ib lub sij hawm railway, lub sij hawm yuav tsis tau stroed raws li ib tug seem array . Koj tuaj yeem xav tau siv ib 3-D array rau khaws cia qhov siab, dav thiab ntev ntawm txhua chav nyob rau hauv txhua pem teb ntawm ib lub tsev.

Ua raws li qhov no hauv kev xav, dab tsi yog multidimensional array?

A multidimensional array hauv MATLAB® yog ib qho array nrog ntau tshaj ob qhov ntev. Nyob rau hauv ib tug matrix, ob lub dimensions yog sawv cev los ntawm kab thiab kab. Multidimensionalarrays yog qhov txuas ntxiv ntawm 2-D matrices thiab siv cov ntawv sau ntxiv rau kev ntsuas. A 3-D array Piv txwv li, siv peb subscripts.

Qhov ob seem array yog dab tsi?

Ob - Dimensional Arrays . A 2D array muaj hom xws li int lossis String, nrog ob khub ntawm square brackets. Cov ntsiab lus ntawm a 2D array yog teem inrows thiab kab, thiab tus neeg teb xov tooj tshiab rau 2D arrays qhia ob tus lej ntawm kab thiab tus lej ntawm kab.

Pom zoo: