Iranian Programming Support

Welcome To Csharp TeaM Forum.
For Use All Forum Posts And See Links
Please Register
Thanks
www.Programming.MrForum.net
Csharp TeaM Administrator
Iranian Programming Support

Csharp TeaM

Top posting users this month

Latest topics

» html to c# source code convert help
by launchar Tue Dec 06, 2016 7:22 am

» User input
by nesraz Sun Dec 20, 2015 8:39 am

» darkhaste source mediaplayer baraye b4a
by parham01 Tue Dec 15, 2015 10:31 am

» Tolide esme file gheire tekrari
by sajjad3011 Fri Jul 31, 2015 5:00 pm

» 368 library basic 4 android
by alimusavi71 Fri Jul 17, 2015 6:45 pm

» نرم افزار دریافت لایسنس آنتی ویروس نود 32
by programmer-x Wed Jul 15, 2015 3:19 pm

» help for java applications
by launchar Wed Jul 01, 2015 12:25 am

» Nimbuzz id Maker auto Captcha & Auto add FlooD & id BloCker
by briant Sat Jun 20, 2015 12:46 pm

» best mobile server v.1.0.0 persian edition
by programmer-x Fri Jun 19, 2015 12:41 am

» plz help me i neez xml code for spy bot
by alone Sun Mar 22, 2015 9:30 pm

» Dialogs Lib {Basic 4 Android}
by abdo0o Mon Mar 09, 2015 4:02 pm

» Room + PV Flooder Nimbuzz 2015
by sholeh Sat Feb 21, 2015 8:06 am

» PV Flooder Nimbuzz 2015
by sholeh Sat Feb 21, 2015 8:03 am

» سی شارپ سورس
by tr0 Wed Dec 24, 2014 12:15 pm

» help plz auto maker ids
by launchar Wed Dec 17, 2014 5:57 pm

» Join Multi Id To Room + Captcha [ Badbuzz Team ] In Seri Ba AgsXMPP !!
by abdo0o Fri Dec 12, 2014 4:47 am

» Amoozesh Ersale Sms Dar B4a
by abdo0o Fri Dec 12, 2014 4:43 am

» help me pls mehran brother
by launchar Wed Dec 03, 2014 6:36 pm

» plz help code Refresh captcha join Room
by ayad53 Wed Dec 03, 2014 12:24 pm

» please Help Me For AutoCaptchaa kardan IdMaker
by abdo0o Tue Dec 02, 2014 12:12 pm

» source C# bot addlist sender by ==> Alone_051@n.c
by walahazrat Mon Dec 01, 2014 2:34 am

» s2a sender tro help me pls
by walahazrat Mon Dec 01, 2014 2:28 am

» Help For {Data id } C# asixmpp.dll
by abdo0o Sun Nov 30, 2014 11:17 pm

» Help C# {Join & Left With Remoter}
by $iahi Tue Nov 25, 2014 10:31 am

» Source Nimbuzz User Searcher By Mehr,an [ Badbuzz TeaM ]
by waseemmalik Wed Nov 19, 2014 11:35 am


    Arraye in c#

    Share

    lvlostafa7
    Android Admin
    Android Admin

    Posts : 168
    Points : 306
    Thanks : 110
    Join date : 2013-06-07
    Age : 26
    Location : Iran.Khuzestan.AhwaZ

    Open Arraye in c#

    Post by lvlostafa7 on Sat Jun 08, 2013 9:04 pm

    salam dostan
    shayad kheylia in amozesh ro ebtedai bedonan ama khob inja mikhaym c# amozesh bedim va lazeme arraye ha ke ghesmat besiar mohemi hastan o amozesh bedim
    va lazeme begam ke to in topic momkene bishtar az 1post bedam va arraye ro tozih bedam khaheshan spam nadid matalebe pishniyaz ro be sorat video to hamin forum amozesh dadim

    Arraye:
    har motaghayer ke taarif mishavad 1 khane az hafeze ra eshghal mikonad,be onvane mesal mikhahim 500 adad sahih ya reshte (string) va ... ro tarif konm in aghelane nist ke 500 motaghayer ro be in sorat benevisim int a1; va int a2; va ...
    dar ingone mavared az motaghayer haye andis dar ya hamon arraye ha estefade mikonim
    pas arraye esmi baraye chandin motaghayer hamnooo ast
    arraye hayi ba 1 andis ro arraye haye 1bo'odi va be tor koli araye hayi ba n andis ro araye n bo'odi migan
    Arraye ha be in sorat tarif mishan


    Code:
    type[] name = new type[n]
    toye in dasto type no'oe arraye hastesh ke mitone int,string,double va .. bashe

    Code:
    int[] x = new int[3]
    in tike code bala ye Arraye be name x az noe int va ba tol 5 tarif mikone
    albate toole arraye mitone hengame ejraye barname taain beshe be in code tavajoh konid


    Code:
    int as = Convert.ToInt32(textBox1.Text)
    int[] a = new int[as]
    toye in code val yek meghdar ro az textBox1 daryaft mikonim va to motaghayeri be name as gharar midim va bad ye Arraye tarif mikoni va tol Arraye ro barabare meghdare toye as migozarim





    در طوفان زندگی با خدا بودن
    خیلی بهتر از ناخدا بودن است


    id : [You must be registered and logged in to see this link.]
    Thanks (+)
    yadet nare ;)

    lvlostafa7
    Android Admin
    Android Admin

    Posts : 168
    Points : 306
    Thanks : 110
    Join date : 2013-06-07
    Age : 26
    Location : Iran.Khuzestan.AhwaZ

    Open Re: Arraye in c#

    Post by lvlostafa7 on Sun Jun 09, 2013 5:02 pm

    salam dostan
    subject: Meghdar dehi avalie be Arraye
    Arraye ha be chand tarigh meghdar avalie mipaziran be in tike tavajoh konid


    Code:
    type[] name = type[n] {value};

    khob hamechiz moayane gheyr az value ke on ham meghdar avalie ee hastesh ke be arraye midim be in mesal tavajoh konid

    Code:
    int[] a = new int[3] {1,5,7}

    to in mesal ma yek arraye az noe int be name a ba tole 3 tarif kardim va maghadir 1,5,7 ro toye in arraye gharar dadim
    ye ravesh dg baraye takhsis meghdar avalie baraye arraye sorat zir ast


    Code:
    int x;
    x = new int[4] {2,6,7,1}

    mitonim maghadir arraye haro az vorodi daryaft konim be in shekl

    Code:
    int[] a = new int[5];
    int i = 0;
    .
    .
    a[i] = Convert.ToInt32(textBox1.Text);
    i++;
    albate az in dastor dar yek halghe estefad mikonim va be sadeghi ba zadan 5 adad dar textBox1 mitonim 5meghdar ro be arraye takhsis bedim





    در طوفان زندگی با خدا بودن
    خیلی بهتر از ناخدا بودن است


    id : [You must be registered and logged in to see this link.]
    Thanks (+)
    yadet nare ;)

    lvlostafa7
    Android Admin
    Android Admin

    Posts : 168
    Points : 306
    Thanks : 110
    Join date : 2013-06-07
    Age : 26
    Location : Iran.Khuzestan.AhwaZ

    Open Re: Arraye in c#

    Post by lvlostafa7 on Mon Jun 10, 2013 4:00 pm

    Be nam khoda
    salam dostan
    subject: dastyabi be anasor arraye va tain tedad anasor arraye
    =====================================================
    baraye dastyabi be anasor araye az ravesh zir estefad mikonim


    Code:
    name[andis arraye]

    andis arraye hamon shomare onsor mored nazar hastesh
    ye nokte mohem
    ma agar tedad anasor yek araye ro 3 entekhab kardim baraye dast yabi be anasor araye
    az adda 0 shoro mikonim be in sorat


    Code:
    int[] a = new int[5] {1,2,7,8,6}
    .
    .
    a[0] = 1
    a[1] = 2
    .
    .
    a[4] = 6

    bebinid akharin onsor ro ba addad 4 bardasht kardim ama toye tarif migim tedad anasor 5 bashe yani 0 - 4
    be in mesal tavajoh konid



    Code:
    int[] x = new int[4] {2,4,1,6};
    textBox1.Text = x[0].ToString();

    inja ye arraye tarif kardim ba 4 onsor va onsor aval ro be textBox1 ekhtesas dadim

    be mesal zir tavajoh konid ham ye ravesh vase meghdar dehi arraye va ham dastyabi be anasor arraye hastesh


    Code:

                int[] a = new int[4];
                for (int i = 0; i < 4; i++)
                {
                    a[i] = i * i;
                    listBox1.Items.Add(a[i]);
                }

    to in mesal yek arraye ba 4 onsor tarif kardim va ba ye halqe for besh meghdar dadim va hamin meghdar haro to listbox namayesh dadim

    TAIN TEDAD ANASOR ARRAYE :

    baraye tain tedad anasor az khasiat Length estefad mikonim be in sorat :


    Code:
    arrayeName.Length;

    be in mesal tavajoh konid

    Code:

                int[] a = new int[4];
                for (int i = 0; i < 4; i++)
                {
                    a[i] = i * i;
                    listBox1.Items.Add(a[i]);
                    int w = a.Length;
                    textBox1.Text = w.ToString();
                }
    hamon mesal ghablie ama 2khat dastor behesh ezaf kardam ke tedad anasor arraye a ro migire to motaghayer w mirize va motaghayer w ro be textbox nesbat dadam va textbox addad 4 ro neshon mide

    movafagh o piroz bashi
    YA HAGH





    در طوفان زندگی با خدا بودن
    خیلی بهتر از ناخدا بودن است


    id : [You must be registered and logged in to see this link.]
    Thanks (+)
    yadet nare ;)

    lvlostafa7
    Android Admin
    Android Admin

    Posts : 168
    Points : 306
    Thanks : 110
    Join date : 2013-06-07
    Age : 26
    Location : Iran.Khuzestan.AhwaZ

    Open Re: Arraye in c#

    Post by lvlostafa7 on Tue Jun 11, 2013 11:25 am

    Be nam khoda
    salam dostan
    subject: hargheye Foreach va peymayesh arraye ba Foreach
    ================================================
    zamani ke mikhahim beyn azaye yek majmoe harkat konim va in majmoe ham aqlab ye arraye ast az halghe
    foreach estefade mikonim
    in shekl dastore foreach hastesh :

    Code:

    foreach(type n in ebarat)
     {
      dastor;
     }


    be in mesal tavajoh konid

    Code:

              foreach(string a in System.IO.Directory.GetDirectories (@"c:\"))
                {
                    listBox2.Items.Add(a);
                }

    to in mesal ma folder haye drive c ro to listBox2 namayesh midim

    NOKTE: be in ghesmat tavaj konid (@"c:\") bejaye in ghesmat mitonim az in ghetee estefad konim ("c:\\")
    to zaban haye khanevade c, \ yek karakter controli hastesh va baraye namayesh \ bayad be in shekl vared konim \\
    ama dar inja ghabl az on az @ estefad kardam zamani ke az @ estefad konim karakter haye controli hamonjor ke nevesht mishan be kar miran yani agar @ bezarim va \\ benevisim be hamin shekle \\ neveshte mishe

    subject: peymayesh arraye ba estefade az dastor Foreach

    dastor foreach baraye peymayesh beyn azaye yek collection va arraye be kar miravad
    be in mesal tavajoh konid


    Code:

    int[] a = new int[5] {2,4,6,7,8}
    foreach(int i in a)
     {
      listBox1.Iteams.Add(i);
     }

    to in mesal ba dastor foreach azaye arraye a ro to listBox1 namayesh midim

    in ham source mesale in dars :

    source foreach

    movafagh o piroz bashid
    YA HAGH






    در طوفان زندگی با خدا بودن
    خیلی بهتر از ناخدا بودن است


    id : [You must be registered and logged in to see this link.]
    Thanks (+)
    yadet nare ;)

    lvlostafa7
    Android Admin
    Android Admin

    Posts : 168
    Points : 306
    Thanks : 110
    Join date : 2013-06-07
    Age : 26
    Location : Iran.Khuzestan.AhwaZ

    Open Re: Arraye in c#

    Post by lvlostafa7 on Wed Jun 19, 2013 3:32 pm


    be name khoda

    salam dostan

    ba dastore zir mitonim araye haro moratab sazi konim

    Code:
    Array.Sort(Array Name); 
    be mesal zir tavajoh konid
    Code:
    string[] s = new string[6] {e,v,a,g,c,z};
    Array.Sort(s);

    toye mesal bala az in dastor baraye moratab sazi arraye ke onsor haye on horof hastand estefad kardim

    khorojie in dastor be shekl zir hastesh



    Code:
    a,c,e,g,v,z

    mozo badi ke mikham beton begam dastori hast ke be vasile on mitonid azaye yek araye ro barax konid



    Code:
    Array.Reverse(Array Name);

    be mesal zir tavajoh konid

    Code:
    Array.Reverse(s);

    in dastor maghadir arraye s ro barax mikone va khoroji be in shekl mishe
    Code:
    z,c,g,a,ve
    ba dastore zir ham mitonim arraye ro pak konim
    Code:
    Array.Clean();
    movafagh o piroz bashid
    YA HAGH





    در طوفان زندگی با خدا بودن
    خیلی بهتر از ناخدا بودن است


    id : [You must be registered and logged in to see this link.]
    Thanks (+)
    yadet nare ;)

    Sponsored content

    Open Re: Arraye in c#

    Post by Sponsored content


      Current date/time is Tue Aug 22, 2017 2:10 am