Dab tsi yog qhov int hauv C#?
Dab tsi yog qhov int hauv C#?

Video: Dab tsi yog qhov int hauv C#?

Video: Dab tsi yog qhov int hauv C#?
Video: yog hmoov dab tsi. Zoo Xyooj (cover) 2024, Kaum ib hlis
Anonim

C# txhawb nqa ib leeg- thiab ntau qhov arrays ntawm txhua yam. Piv txwv li, int ? yog hom uas tuaj yeem tuav tau 32-ntsis tus lej los yog tus nqi null. C# tus hom system yog kev sib koom ua ke xws li tus nqi ntawm txhua yam tuaj yeem kho raws li ib qho khoom.

Ib yam li ib tug yuav nug, dab tsi yog qhov int hauv C#?

yog hom uas tuaj yeem tuav tau 32-ntsis tus lej los yog tus nqi null. Txhua yam hauv C# ncaj qha los yog indirectly muab los ntawm hom hom khoom, thiab cov khoom yog qhov kawg hauv chav kawm ntawm txhua hom.

Qhov thib ob, qhov ntev int hauv C yog dab tsi? ntev int . kos npe ntev . kos npe ntev int . Ntev kos npe tus lej hom. Muaj peev xwm muaj tsawg kawg yog [−2, 147, 483, 647, +2, 147, 483, 647] ntau yam; yog li, nws yog tsawg kawg yog 32 me me.

Hais txog qhov no, txhais li cas los ntawm INT?

Int , luv rau "integer," yog ib hom kev hloov pauv tseem ceeb ua rau hauv lub compiler thiab siv los txhais cov lej sib txawv uas tuav tag nrho cov lej. Lwm cov ntaub ntawv muaj xws li ntab thiab ob npaug. C, C ++, C# thiab ntau lwm yam lus programming paub int raws li hom ntaub ntawv.

Qhov txawv ntawm int thiab int * yog dab tsi?

Java ob int thiab Integer yog siv los khaws cov ntaub ntawv hom integer qhov loj qhov sib txawv ntawm ob leeg yog hom int yog primitive thaum Integer yog hom chav kawm. Ntawm qhov tod tes, Integer yog ib chav wrapper uas wraps hom primitive int rau hauv ib yam khoom.

Pom zoo: