An warware: hello shirin duniya in

Tabbas, ga cikakken labarin akan shirin Duniya mai sauƙi a cikin C#.

Kowane kasada a cikin shirye-shirye yana farawa da shirin “Hello Duniya” na gargajiya. Wannan shiri ne mai sauƙi wanda ke fitar da "Hello Duniya" akan allon. Za mu rubuta wannan shirin a cikin yaren shirye-shiryen C # (C-Sharp). C# Microsoft ne ke haɓaka shi a matsayin wani ɓangare na shirin su na NET kuma ya girma zuwa yare mai shahara sosai don haɓakar tebur da yanar gizo.

amfani da Tsarin;

aji Shirin
{
a tsaye babu Main()
{
Console.WriteLine ("Hello, Duniya!");
}
}

Fahimtar Shirin Duniya na Hello a cikin C#

The `amfani da System;' a farkon lambar ana kiranta umarnin amfani. A cikin C #, tsarin sunan tsarin ya ƙunshi dukkan azuzuwan asali. Waɗannan sun haɗa da ajin Console wanda ke ba da hanyar fitar da bayanai zuwa na'ura wasan bidiyo.

An bayyana ajin 'Shirin' na gaba. Wannan aji ne mai sauƙi wanda ke ɗauke da aikin 'Babban()'. Babban aikinmu shi ne wurin shiga shirinmu. Lokacin gudu na NET yana kiran babbar hanyar.

A cikin Babban Hanyar, ''Console.WriteLine("Sannu, Duniya!")) an bayar da sanarwa. Yana gaya wa na'ura wasan bidiyo don fitar da kirtani "Sannu, Duniya!". Semicolon a ƙarshen wannan magana yana nuna ƙarshen wannan magana.

Wurin Sunan Tsarin a cikin C#

Wurin suna System wani muhimmin sashi ne na kowane shirin C#. Yana ba da azuzuwan da musaya waɗanda ke goyan bayan ayyuka iri-iri iri-iri. Baya ga ajin Console da muka yi amfani da shi a baya, ya haɗa da ayyuka na lissafi, shigar da fayil/fitarwa (I/O), sadarwar cibiyar sadarwa, zaren zare, da ƙari irin waɗannan ayyuka. Duk waɗannan iyawar suna sanya tsarin sunan System ya zama babban al'amari na yanayin shirye-shiryen C #.

Tunanin azuzuwa da hanyoyin a C #

Ma'anar azuzuwan da hanyoyin suna da mahimmanci ga C #, kuma lalle ne, duk wani harshe na shirye-shiryen da ya dace. Aji shine tsarin ƙirƙirar abubuwa, kuma yana ɗaukar bayanai don abun. Hanyoyi suna bayyana abin da abin aji zai iya yi.

A cikin shirin mu na Duniya barka da warhaka, `Shirin` shine darasi. Hanyar 'Babban' a cikin aji shine aikin da wani abu na 'Shirin' zai iya ɗauka. Tun da aikin shine fitar da "Sannu, Duniya!" a kan na'ura mai ba da hanya tsakanin hanyoyin sadarwa, shi ne ainihin abin da shirinmu na Duniya Salam yake yi.

Ta hanyar fahimtar sauƙaƙan shirin Duniya na Duniya, za mu ɗauki mataki na farko don buɗe hanyar da ta dace ta shirye-shiryen C #.

Shafi posts:

Leave a Comment