•?((¯ώ๏ℓƒ βµƶƶ¯))؟•
Salam , be forume wolfbuzz team khosh umadi duste aziz !
Omidvaram az in forum lezat bebari ,

Vaseye didane link ha ya download kardan , ya gozashtane pos ehtiaj be sabte nam hast !!!

Please register kon duste aziz

EnJoY !!! WolfBuzZ

behtarin ha haqe shomast

Join the forum, it's quick and easy

•?((¯ώ๏ℓƒ βµƶƶ¯))؟•
Salam , be forume wolfbuzz team khosh umadi duste aziz !
Omidvaram az in forum lezat bebari ,

Vaseye didane link ha ya download kardan , ya gozashtane pos ehtiaj be sabte nam hast !!!

Please register kon duste aziz

EnJoY !!! WolfBuzZ

behtarin ha haqe shomast
•?((¯ώ๏ℓƒ βµƶƶ¯))؟•
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Latest topics
» full cracker
by amin742 Mon Oct 21, 2013 8:17 pm

» anti tabliq coded by sina.lor.boy@n.c
by sina.lor.boy Wed Sep 11, 2013 4:29 am

» new bombus 2013
by gonga Wed Sep 04, 2013 7:12 pm

» new bombus 2013 collections
by gonga Wed Sep 04, 2013 7:09 pm

» موبایل jar call flood jar
by takstarone Thu Aug 29, 2013 7:12 am

» پس گرفتن آیدی هک شده
by takstarone Thu Aug 29, 2013 6:47 am

» s2a sender by sina.lor.boy
by sina.lor.boy Wed Aug 28, 2013 6:56 am

» wolf full bot by sina.lor.boy
by sina.lor.boy Wed Aug 28, 2013 6:51 am

» Dc All Client
by amin742 Fri Aug 23, 2013 2:43 am

» 1000 ta id flood free
by navid+ Thu Aug 22, 2013 9:23 am

» id maker anti block
by sabuory Sat Aug 17, 2013 7:21 am

» WolfBuzZ TeaM
by sabuory Tue Aug 13, 2013 1:01 pm

» WOlfBuzZ Rules UPdate
by sabuory Tue Aug 13, 2013 12:52 pm

» 40new bombus for java
by Street-crazy Thu Aug 08, 2013 1:48 pm

» source ADD Flooder
by v!rus..trojan Wed Aug 07, 2013 3:00 pm

» sina.lor.boy
by sina.lor.boy Mon Aug 05, 2013 2:00 pm

» Direct Id Unblocker Via Admin (new)
by oful Wed Jul 24, 2013 5:31 pm

» wildbuzz id unblocker.unremove.back....
by oful Wed Jul 24, 2013 5:16 pm

» cobra floooooooooder
by oful Wed Jul 24, 2013 4:52 pm

» jimm multi By ghsmat@n
by oful Wed Jul 24, 2013 4:39 pm

» full bot badbuzz new
by !cg Wed Jul 24, 2013 11:52 am

» badbuzz notepad by t00rk@n.c
by AreFF Thu Jul 18, 2013 10:11 pm

» دانلود تم HD براي آندرويد - تم اندرويد
by best(-((+_~))-)boy Tue Jun 25, 2013 5:53 am

» fun cracker1.1.1.rar
by best(-((+_~))-)boy Tue Jun 25, 2013 5:47 am

» fooorosh hame chi bia tooo
by best(-((+_~))-)boy Sun Jun 23, 2013 6:58 am

» http://s4.picofile.com/file/7761842361/ehem_buzz.rar.html
by jone.jone.. Sat Jun 22, 2013 7:23 pm

» ** SMS bahal **
by yas_ye2ne.bashe Fri Jun 21, 2013 4:13 pm

» مجموعه ابزار فوق العاده برای یک هکر
by yas_ye2ne.bashe Fri Jun 21, 2013 3:20 pm

» TV remote.apk :D
by yas_ye2ne.bashe Fri Jun 21, 2013 3:16 pm

» Mig33_4.20.jar
by yas_ye2ne.bashe Fri Jun 21, 2013 3:08 pm

Top posters
gun**jak** (448)
 darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Vote_lcap darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Voting_bar darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Vote_rcap 
nariman.kafar (413)
 darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Vote_lcap darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Voting_bar darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Vote_rcap 
best(-((+_~))-)boy (330)
 darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Vote_lcap darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Voting_bar darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Vote_rcap 
ardent_joker (45)
 darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Vote_lcap darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Voting_bar darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Vote_rcap 
bibak2m (31)
 darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Vote_lcap darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Voting_bar darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Vote_rcap 
sabuory (27)
 darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Vote_lcap darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Voting_bar darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Vote_rcap 
yas_ye2ne.bashe (16)
 darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Vote_lcap darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Voting_bar darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Vote_rcap 
shahin-dracula (15)
 darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Vote_lcap darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Voting_bar darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Vote_rcap 
hosein~beterekoon (12)
 darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Vote_lcap darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Voting_bar darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Vote_rcap 
muozy (10)
 darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Vote_lcap darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Voting_bar darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Vote_rcap 

Keywords

ma3oud  


darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project

Go down

 darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project Empty darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project

Post by gun**jak** Sat Jun 01, 2013 7:50 pm







darsnameh 2: tarife namespace,class,function - Variables - Simple Console Application Project


.+
----
-khob darse jadid 0 ba moarefi e namespace + class + variables + chanta syntax e payeyi az c# o barnamenevisi va ye mesale sade ba console application shoro mikonim
----------------------------------------------------------------------------------------------------------------------
chanta tarif
class :
majmoo'eyi az ashya(objects) + tavabe(funtions) k baham dar ertebatan [in tarif e khodame]
shoma har class i k to c# ijad mikonin , shamele function (tabe) - member ha( mesle field ha + moteqayer ha va ...) hast va hadafe khasi r0 donbal mikonan
{jelotar berim kamel tozih midam in tarif e moqadamati}
****
function (tAbe):
dorost mese riazi - x - parametre vorodie tabe bashe - dakhele tAbe ye seri amaliat r0ye -x- anjam mishe ye khoruji behet mide mese -y-
[hala to zabane barname nevisi ma b -x- migim "parameter" va b -y- migim output( ya return)

to zabane barname nevisi: in emkan vojod dare k hich parametre vorodi nadashte bashim va ya hich meqdari ham dar khoroji return nadashte bashim (faqat ye amaliate khas dakhele function donbal konim)
****
namespace(fazaye nAm):
dar bar girandeye majmooeyi az class ha hast ---- ye mesal b zabune mamuli bezanam:
farz konid mikhayn 2ta class b esme bazigosh tarif konin...age har 2ta class0 dakhele 1 dune namespace benevisin ba khata movajeh mishin
ama age 2ta namespace mojaza dashte bashin, mitunin 2ta class e ham esm r0 dashte bashin

namespace one{
public class bazigosh { }
}
namespace two{
public class bazigosh { }
}

b shekle foq hich gune khatayi moshahed nemishe - baraye dastyabi b class haye bazigosh b tartibe zir amal mikonin

one.bazigosh
two.bazigosh


pas fahmidim k namespace baraye tamayoz beine class ha hast (har namespace ham mitune shamele chandin class bashe)

inam chanta tarif e moqadamati
---------------------------------------------------------------------
VARIABELS:
moteqayer ha:
mese ye zarf hastan k gonjayesh va mohtaviate khasi r0 daran ...(in zarf , mahali az hafeze(memory) hast)...
pas estefadeye beja azin zarfe, b s0rate pardazesh0 behine sazie fazaye memory komak mikone

shoma in gonjayesh + mohtavaye zarf0 ba tavajoh b niazetun entekhab mikonin

masalan "integer" ye no moteqayere k faqat adad haye sahih r0 negah mikone- bazeye add -2147483647
anva e moteqayer haye c# r0 bhtun moarefi mikonam:
moteqayer haye adadi:
adade sahih:


int: -2,147,483,648 to 2,147,483,647
uint: 0 to 4,294,967,295
byte: 0 to 255
sbyte: -128 to 127
long: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
ulong: 0 to 18,446,744,073,709,551,615
short: -32,768 to 32,767
ushort: 0 to 65,535


http://msdn.microsoft.com/en-us/library/exx3b86w(v=vs.80).aspx

bazeye har moteqayer moshakhas shode (masalan byte adad haye beine 0 ta 255 mitune negah dari kone - age bekhahid 256 r0 zakhire konin ,dg ba byte in kar amali nis - pas miayn az ushort estefade mikonin, k fazaye kamtari az hafeze r0 migire va 256 r0 dakhele khodesh jay mide
harchi bazeye moteqayer bozorg tar bashe, fazaye bishtari az hafeze r0 eshghal mikone

moteqayere adade haqiqi (b qole khodemun ashari ya momayez dar):

float: ±1.5e?45 to ±3.4e38 ~> 7 raqam ashar
double: ±5.0e?324 to ±1.7e308 ~> 15-16 raqam ashar

http://msdn.microsoft.com/en-US/library/9ahet949(v=vs.80).aspx

-----------------------------------------------------
moteqayer haye qeire adadi:
char: character migiran mesle 'c' ya 'a' ya hata '1' (dar inja 1 be onvane adad nist ye character mahsub mishe)
string (reshte): majmoeyi az character ha mese "bazigosh" ya "ali123" ya "badbuzz good"
(space ya hamun fasele ham 1 character mahsub mishe)
bool: in moteqayer boolean hast 2ta meqdar dare : true va false
baraye check kardan shart hayi k dar barname mizarim karbord dare


-----------------------------------------------------------------------
chanta mesal az moetqayer ha mizanam:
[tavjoh konin k baraye string az " estefade mikonim va baraye char az ' estefade mikonim]

int a=10;
byte average = 96;
char ch = 't';
string s = "salam be hameye lop haye badbuzz";

meqdare moteghayer har0 morataban mishe taqir dad va maqadire qabl r0 pak kard....
masalan
int a = 10;
a = 20;
age in 2ta dastur0 poshte sare ham vared konin, va meqdare a r0 namayesh bedin a = 20
********************************
pas ye bar be surate koli migam:
moteqayer ha az 2 qesmat tashkil mishan : 1- no e moteqayer 2-esm baraye moteqayer
no e moteqayer bala goft shod (mesle int, char va ....)
esme moteqyer ham ye seri qavanin dare:
harfe aval nabayad adad bashe
esm shamele character haye gheire mojaz nabashe
esme moteqayer b horofe bozorg o kuchik hasase (Case sensitive)
shamele fazaye khali nabashe
harfe avale moteqayer mitune ba underline _ shoro she
ta haminja yadam bod []
******************************

nahveye tarif moteqayer b shekl e zire : aval no e moteqayer0 tarif mikonin badesh esmesh

bool parcham;
parcham = true;

to mesale bala ye moteqayer boolean b esme parcham ijad kardim va khate payin meqdare parcham r0 true kardim

karborde estefade az moteqayer ha r0 toye project nevejtan migam

------------------------------
chanta syntax e sade:
har dasturi k toye c# mineveisin b semicolon ; khatm mishe dar qeire in surat khata mahsub mishe

vaqti moteqayeri toye c# ijad mikonin hatman meqdar dehie avalie she vagarna ba khata rober0 mishin
masalan:

string str;

age jayi bekhayn az str estefade konin ba error "initialize" movajeh mishin
pas be jaye dasture foq in0 benevisin

string str="";
meqdar dehie avalie shod (meqdaresh tohi hast)

darsaye badi ba moteqayera bishtar ashna mishin
tarife
scope
global variable
local variable
-------------------------------------------------------------
hala ye mesale sade r0 shoro mikonam ba console application k faqat nahveye estefade az moteqayer har0 namayesh bedam
az darsaye badi ba windows form kar mikonim

visual studio ro baz konin
az menu file->new->project r0 entekhab konin

screen zir0 bebinin


kadr haye qermez dakhele screen k moshakhas kardam r0 bebinin...
.Netframework 4 : to in qesmate tayin mikonin barname tahte che dotnetframeworki neveshte she ... zaman ejra b un dotnet framework niaz darin

az menu samte chap: visual c# ~> windows entekhab shode bashe (yani tahte windows be zaban c# mikhayn barname benevisin)

Console Application r0 entekhab konin ~> albate baraye darsnameye 2 ----- az dorose badi ba Windows Form Application kar mikonim

hala az qemate "Name" esmi r0 vase project entekhab konin (masalan man test gozashtam)

Ok bezanin

hala project ijad mishe....



Class e: "Program.CS" ijad mishe, namespace daqiqan moshabehe project name hast (test)

agar program.cs r0 nadidin bayad az toolbare "Solution Explorer" mohtaviate project0 negah konin
screen har0 donbal konin




---------------------------------------------------------------------------------------------
static void Main(string[] args)
{
}
in function tAbe che toye zabane c# che zabane C , noqteye shoro e ejraye barname hast....
baraye halate Console Application code har0 dakhele in qesmat minevisim

dar halate console baraye chap kardane meqdari (namayesh dadan) az class Console va tAbe WriteLine() estefade mikonim

be in shekl:
Console.WriteLine();

tozihate ziadi raje b Console.WriteLine() nemidam ch0n bahash dg kar nemikonim - windows form bahsesh jodas


Code:
namespace test
{
class Program
{
static void Main(string[] args)
{
//moteqayer a ba meqdare 10 ijad kardim
int a = 10;

//moetqayer b ba meqdare 1000 ijad kardim
int b = 1000;

//ijad moteqayer integere c
int c;

//meqdare moteqayer c majmoe maqadire a va b hast
c = a + b;



Console.WriteLine(a);
Console.WriteLine(b);
Console.WriteLine(c);

Console.ReadKey();


}
}


baraye debug kardan (rafe khata haye mojod) va run kardan e barname az menu debug~>start debugging ro entekhab konin
ya tebqe tasvir amal konin o dokmeye play ro feshar bedin


ya ba estefade az kelid mianbar "F5" halate debug ro run konin


toye code bala:
Console.ReadKey(); in dastur b che manzure ? agar in datur0 nanevisim .... be mahze run kardan e barname, console dar yek cheshm b ham zadan, baste mishe [etealat0 namayesh mide o baste mishe] ...ba in dastur console r0 negah midarim(baste nemishe) ta che zamani ? ta zamani k karbar yedune kelid roye keyboard feshar bede ( ReadKey() b in mafhume k kelid r0 bekhun)

screen ro negah konin


meqdare aval: moteqayer a chap shode
meqdare dovom: moteqayer b chap shode
meqdare sevom: moteqayer c chap shode [ k majmoo e a+b hast]

hala shoma mitunin har amaliate dg r0ye moteqayer ha piade konin - inja faqat ye mesale sade baratun zadam
--------------------------------------------------------------------------------------------------
harchi fk mikonam to in darsname chi kam o ziad goftam yadam nemiad age moshkeli dashtin soali dashtin haminja begin
ta on qesmat0 bishtar tozih bedam









age khob motavajeh nashodi pain linke ax gozashtam dwonload kon behtar motavajeh shi

















http://upload.tehran98.com/img1/hcnucd1eybjk9blo93gt.png


http://upload.tehran98.com/img1/b7x38qgfjlz1xmhq6ztm.png


http://upload.tehran98.com/img1/mh4ypukigvhsu45ikdr.png


http://upload.tehran98.com/img1/ctcoziidzbvjf5mvbwc.png

http://badbuzz.team-forum.net/t4214-darsnameh-2-tarife-namespaceclassfunction-variables-simple-console-application-project


http://upload.tehran98.com/img1/79yko7uicj0wk9q5ggey.png


http://upload.tehran98.com/img1/rw3bs6ui0ao0be4horih.png
.
avatar
gun**jak**
Moderator

Posts : 448
Points : 1470
Join date : 2013-05-29

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum