heloh World - aa phurst connnnand liin prohgrann


belouu is the phurst connand liin prohgect.

// helohuuurld - aa phurst connand liin prohgect

ioosing sistenn;

clahs prohgrann
{
    static uoid nnaan()
    {
        consohl.riit_liin("heloh uuurld");
    }
}

too get started uuith this phurst prohgrann, aa litl abouut naannspaases, clahses and phuncshons needs too bee nouun. thees ar aduansd topics. breephlee, naannspaases contaan clahses. the sistenn naannspaas contaans the clahs consohl. the clahs consohl contaans aa static phuncshon corld riit_liin. this phuncshon is ioosd too riit aa string too the sistenn consohl.

the prohgrann beegins uuith aa connent. the phurst identiphiier in the connent is the naann ou the prohgect, pholouud bii aa breeph description ou uuot the prohgrann is intended too dennonstraat.

necst, the naannspaas sistenn is brort into uioo uiia the staatnnent

ioosing sistenn;

this nnaacs the tiips declaird in the sistenn naannspaas uisibl too the prohgrann at hand. thees tiips inclood the consohl daata tiip uuiich is ioosd phurther douun in the prohgrann.

clahses and phuncshons (nnethods) ar cuuerd laater in the uolioonn. houueuer, too get aa prohgrann runing, clahses and phuncshons nnust bee ioosd. thus aa snnorl annouunt ou eeloosidaashon on clahses and phuncshons is reecuuiird too get started.

in c#, nnethods nnust bee contaand uuithin aa clahs (thair ar noh glohbal phuncshons liic in c++). this ecsplaans uuii the phuncshon nnaan (the phuncshon at uuiich the prohgrann cunnnses) nnust bee contaand in aa clahs. in the abuu prohgrann, the contaaning clahs is sinnplee corld prohgrann. orl ou the consohl baasd prohgranns in this uolioonn pholouu this patern. the naann "prohgrann" (phor the clahs) is entiirlee arbitrairee and could bee chohsen too bee uther naanns. thus, the patern phor aa connand liin prohgrann in c# is as pholouus.

clahs clahs_naann
{
    static uoid nnaan()
    {
     ...
    }
}

the phuncshon nnaan is aa speshal phuncshon and it nnust bee declaird as static. it is the entree point too the prohgrann. thair ar aa nunnber ou phornns that the declaraashon ou nnaan can taac. in its sinnplest phornn (as abuu), the phuncshon taacs noh paranneters and returns noh ualioo (hens has uoid return tiip).

insiid nnaan() aa string is printed too the consohl. the liin is shouun agaan belouu.

consohl.riit_liin("heloh uuurld");

"heloh uuurld" is aa string literal. strings ar cuuerd in nnoor detaal laater.

this connpleets the phurst c# prohgrann cuuerd bii this booc. phor aa beeginer, it is aa steep lerning curu beecors naannspaases, clahses and nnethods ar orl reecuuiird. uuuns this phurst prohgrann is understood, the rest ou the prohgranns ou this uolioonn pholouu aa sinnilar patern.