.


:




:

































 

 

 

 





, # . , . # : (value-based) (reference-based). (int, float .), . . ( ), . ( ) -. , . , .

 

 

13. .

(typeconversion) . . , . , , . . ) , , . (), .) . . , . , . , .

 

 

14. System.Object. System.Object .NET, # object, . . object , .

System.Object .

Equals true, . : public virtual bool Equals(object obj);

Equals true, . :

public static bool Equals(object obi, object ob2);

GetHashCode - , . . Equals, GetHashCode. - : public virtual int GetHashCodeO;

GetType , , , . . , 1. : public Type Get ;

ReferenceEquals true, . : public static bool(object obi, object ob2);

ToString , , . , . : public virtual string ToStringO

 

if switch . if , switch .

if if

: if () _1; [ else ; ]

s w i t c h () .

:

switch ){

case __1: [ __1 ]

case __2: [ __2 ]

case : [ ]

[ default: ]

switch if , , , . , .

 

.

# , for, while, do...while, foreach. , # , goto, break, continue return.1) goto . , . . 2) : . , , while .3) , while . , , . do...while.. , do...while , . 4) for .5) foreach (collection) .6) break continue , , . break continue. - , , break.

 

 

, , , , . . # . , . , . . C# try.. catch. try :

, try. . , , ;

catch, , ;

finally , . try:

try [ catch ] [ finally ]

 

.

() .
, . : , int double 4 Add .

 

 





:


: 2016-07-29; !; : 578 |


:

:

,
==> ...

1683 - | 1627 -


© 2015-2024 lektsii.org - -

: 0.013 .