.


:




:

































 

 

 

 


, orgstr , substr.




: , , #, . # StringBuilder, System.Text. , . , , C# string, StringBuilder.

switch

string switch. , switch. , . , , "", "" "".

// switch .

Using System;

class StringSwitch { static void Main() {

string[] strs = { "", "", "", "", "" };

foreach(string s in strs) { switch (s) {

case "":

Console.Write (1);

break; case "":

Console.Write (2); break; case "":

Console.Write (3); break;

}

}

Console.WriteLine ();

}

}

.

 

 

8

. . , , , Main (), static.

. -, . , 6. -, . , .

#, , : , . , . . , . .

- , .

, , , , . . , . , " 7', , .

C# : public, private, protected internal. public private. protected , , 11. internal , C# , 16.

public, , , . private, . , (private) .

6, , . private .

. , . .





:


: 2016-12-03; !; : 356 |


:

:

,
==> ...

1027 - | 840 -


© 2015-2024 lektsii.org - -

: 0.012 .