Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C#ÃæÊÔ±ÊÊÔСÌùÊ¿ 1

ü   ref¡¢out¡¢Óëparams
Ó¦¸ÃÀ´ËµÕâÈý¸ö¹Ø¼üÔÚÒ»°ãµÄ±àÂë¹ý³ÌÖл¹Êǻ᲻ʱÉæ¼°µ½µÄ£¬ËùÒÔ²»Ëãʲô“ÀäƧ”µÄ¸ÅÄî¡£ÓйØÈý¸ö²ÎÊýÐÞÊηûµÄ½âÊÍÈçÏ£º
Ref£ºref¹Ø¼ü×ÖÈÃÒ»¸öÖµÀàÐ͵ÄÊäÈë²ÎÊý°´ÒýÓô«µÝ¡£Êµ¼ÊÉÏ£¬¶ÔÓÚÒýÓÃÀàÐ͵IJÎÊý£¬ÊÇ·ñʹÓÃref¹Ø¼ü×Ö£¬²î±ð΢ºõÆä΢¡£ÓÐÒ»¸öÀýÍâÊÇStringÀàÐ͵IJÎÊý£¬ÓÉÓÚC#ÖеÄString¶ÔÏóÊDz»¿ÉÐ޸ĵģ¬ËùÒÔÒªÏëÕæÕý´ïµ½²ÎÊýÒýÓô«µÝµÄЧ¹û£¬ÐèҪʹÓÃref¹Ø¼ü×Ö¡£
Out£ºÊ¹ÓÃout¹Ø¼ü×Ö±íʾ´Ëº¯Êý²ÎÊýΪÊä³ö²ÎÊý¡£Out¹Ø¼ü×ÖÖ÷ÒªÓ¦¸ÃÊÇÓÃÓÚʵÏÖº¯ÊýµÄ¶à¸ö·µ»ØÖµ£¬Ê¹ÓÃËüÐÞÊβÎÊýµÄΨһºÃ´¦ÔÚÓÚ±äÁ¿ÔÚ´«µÝ¸øoutÀàÐͲÎÊýÇ°£¬²»ÐèÒª³õʼ»¯¡£
Params£ºparams¹Ø¼ü×ÖÖ¸Ã÷Èô¸ÉÊäÈë²ÎÊý½«±»¿´×÷Ò»¸ö²ÎÊýÊý×é¡£Params¹Ø¼ü×ÖÖ»ÄÜÓÃÓÚ²ÎÊýÁбíµÄ×îºóÒ»¸ö²ÎÊý£¬ÕâÒ²ºÜºÃÀí½â¡£Êµ¼ÊÉÏÎÒ¸öÈËÈÏΪÈý¸ö²ÎÊýÐÞÊηûÖУ¬paramsÊDZȽÏÓÐÒâÒåͬʱÓô¦½Ï´óµÄ¡£
 
ü   constÓëreadonly
´ó¶àÊýÈË»á×¢Òâµ½const¡¢readonlyµÄÒ»¸öÇø±ð£¬Ê¹ÓÃconstÐÞÊεÄ×Ö¶ÎÊÇ“±àÒëʱ³£Á¿”£¬Ê¹ÓÃreadonlyÐÞÊεÄ×Ö¶ÎÊÇ“ÔËÐÐʱ³£Á¿”£¨Êµ¼ÊÉÏÀ´ËµËü²¢·ÇÕæÕýÒâÒåÉϵij£Á¿£©£¬½èÖúÒÔÏÂÀý×Ó¿ÉÒÔ°ïÖúÀí½â£º
Public const int ConstSample=1;
Public readonly DateTime RoSample=DateTime.Now;
³ý´ËÖ®Í⣬const¡¢readonlyÖ®¼ä»¹ÓÐÆäËüһЩ²î±ð£¬°üÀ¨£º
*³£Á¿×Ö¶Î×ÜÊǾ²Ì¬µÄ£¨Ëü²»Óò¢ÇÒ²»ÄÜÏÔʽÉùÃ÷Ϊstatic£©£¬Ö»¶Á×ֶοÉÒÔÉùÃ÷Ϊ¾²Ì¬µÄ£¬µ«Ä¬Èϲ»ÊÇ£»
*³£Á¿×ֶαØÐëÔÚÉùÃ÷ʱ³õʼ»¯¡£Ö»¶Á×ֶοÉÒÔÔÚÉùÃ÷ʱ³õʼ»¯£¬Ò²¿ÉÒÔÔÚ¹¹Ô캯ÊýÖгõʼ»¯£¬»òÕß²»³õʼ»¯£»
*³£Á¿×Ö¶ÎÖ»ÄÜÊÇÄÚ½¨µÄÖµÀàÐÍ¡¢×Ö·û´®ÒÔ¼°Ã¶¾ÙÖµ£¬Ö»¶Á×Ö¶ÎûÓÐÕâÒ»ÏîÏÞÖÆ¡£
 
ü   ¾²Ì¬¹¹Ô캯Êý
ͨ³£ÊÇһЩÍâÆóÔÚ±ÊÊÔʱ»áÎʵ½¹ØÓÚ¾²Ì¬¹¹Ô캯ÊýµÄÎÊÌ⣬ÀÏÍâµÄÏë·¨¾ÍÊDz»Ò»Ñù¡£Æ½ÐĶøÂÛÓõ½¾²Ì¬¹¹Ô캯ÊýµÄµØ·½²»¶à£¬ÖÁÉÙ¶ÔÎÒ¶øÑÔ¾²Ì¬¹¹Ô캯ÊýûÅÉÉÏʲôÓó¡¡£
¶ÔÓÚ±ÊÊÔ£¬ÓÐÈýµãÐèҪעÒâһϣº
*¾²Ì¬¹¹Ô캯Êý²»ÔÊÐíÓзÃÎÊÐÞÊηû£»
*¾²Ì¬¹¹Ô캯Êý²»ÔÊÐí±»ÏÔʽµ÷Óã»
*¾²Ì¬¹¹Ô캯ÊýÔÚ¼ÓÔØÀàʱʵµ÷ÓÃÒ»´Î£¬¼´ÔÚ´´½¨ÀàµÄÈκÎʵÀý£¨ÔڷǾ²Ì¬¹¹Ô캯ÊýÇ°Ö´ÐУ©ºÍÒýÓÃÀàµÄÈκγÉÁ¿Ö®Ç°¡£
 
ü   ¶à̬
Ê×ÏÈÄã×îºÃÄÜÇå³þ˵Ã÷¶à̬µÄ¸ÅÄҲÐíÄãÌìÌìÓã¬È´²»Ò»¶¨ÄܱíÊöÃ÷°×¡£×÷ΪOO±à³ÌÖеÄÈý´óÌØÐÔÖ®Ò»£¨ÁíÁ½¸öÊÇ·â×°¡¢¼Ì³Ð£©£¬¿ÉÒÔ˵ÊÇOO±à³ÌµÄʵÖÊ£¬ËüÒâζ×Å¿ÉÒÔÓжà¸ö¿É»¥»»Ê¹ÓõÄÀ࣬¼´


Ïà¹ØÎĵµ£º

C#ÃæÏò¶ÔÏó »ù´¡¸ÅÄî25¸ö

1.¾²Ì¬³ÉÔ±ºÍ·Ç¾²Ì¬³ÉÔ±µÄÇø±ð£¿
2.const ºÍ static readonly Çø±ð£¿
3.extern ÊÇʲôÒâ˼£¿
4.abstract ÊÇʲôÒâ˼£¿
5.internal ÐÞÊηûÆðʲô×÷Óã¿
6.sealed ÐÞÊηûÊǸÉʲôµÄ£¿
7.override ºÍ overload µÄÇø±ð£¿
8.ʲôÊÇË÷ÒýָʾÆ÷£¿
9.new ÐÞÊηûÊÇÆðʲô×÷Óã¿
10.this ¹Ø¼ü×ֵĺ¬Ò壿
11.¿ÉÒÔʹÓóéÏóº¯Ê ......

C#ʼþ(event)½âÎö

      ʼþ(event)£¬Õâ¸ö´Ê¶ù¶ÔÓÚ³õѧÕßÀ´Ëµ£¬ÍùÍù×ÜÊÇÏÔµÃÓÐЩÉñÃØ£¬²»Ò×Ū¶®¡£¶øÕâЩ¶«Î÷È´ÍùÍùÓÖÊDZà³ÌÖг£ÓÃÇҷdz£ÖØÒªµÄ¶«Î÷¡£´ó¼Ò¶¼ÖªµÀwindowsÏûÏ¢´¦Àí»úÖƵÄÖØÒª£¬ÆäʵC#ʼþ¾ÍÊÇ»ùÓÚwindowsÏûÏ¢´¦Àí»úÖƵģ¬Ö»ÊÇ·â×°µÄ¸üºÃ£¬Èÿª·¢ÕßÎÞÐëÖªµÀµ×²ãµÄÏûÏ¢´¦Àí»úÖÆ£¬¾Í¿ÉÒÔ¿ª·¢³öÇ¿´óµÄ»ùÓÚ ......

c# enmu ö¾ÙС½á(1)

 
ö¾Ù
¡¡¡¡Ã¶¾ÙÀàÐÍÉùÃ÷Ϊһ×éÏà¹ØµÄ·ûºÅ³£Êý¶¨ÒåÁËÒ»¸öÀàÐÍÃû³Æ¡£Ã¶¾ÙÓÃÓÚ“¶àÏîÑ¡Ôñ”³¡ºÏ£¬¾ÍÊdzÌÐòÔËÐÐʱ´Ó±àÒëʱÒѾ­É趨µÄ¹Ì¶¨ÊýÄ¿µÄ“Ñ¡Ôñ”ÖÐ×ö³ö¾ö¶¨¡£
¡¡¡¡Ã¶¾ÙÀàÐÍ£¨Ò²³ÆΪö¾Ù£©Îª¶¨ÒåÒ»×é¿ÉÒÔ¸³¸ø±äÁ¿µÄÃüÃûÕûÊý³£Á¿ÌṩÁËÒ»ÖÖÓÐЧµÄ·½·¨¡£ÀýÈ磬¼ÙÉèÄú±ØÐ붨ÒåÒ»¸ö±äÁ¿£¬¸Ã±äÁ¿ ......

C#ÈëÃÅ

±äÁ¿¡¢³£Á¿¼°±í´ïʽ±äÁ¿ºÍ³£Á¿±äÁ¿(¾²Ì¬¡¢·Ç¾²Ì¬¡¢Êý×éÔªËØ¡¢Öµ²ÎÊý¡¢ÒýÓòÎÊý¡¢Êä³ö²ÎÊý¡¢¾Ö²¿±äÁ¿)¾²Ì¬(static) Èç public static int x;  Ò»µ©¾²Ì¬±äÁ¿ËùÊôµÄÀà±»×°ÔØ£¬Ö±µ½°üº¬¸ÃÀàµÄ³ÌÐòÔËÐнáÊøʱËüÒ»Ö±´æÔÚ¡£·Ç¾²Ì¬£º²»´øÓÐstaticÐÞÊηûÉùÃ÷µÄ±äÁ¿³ÆΪʵÀý±äÁ¿£¬Èçint a ;³£Á¿(attributes constnt-modifiers CO ......

C# תÒåÐòÁÐ Unicode ×Ö·û±àÂë

תÒåÐòÁР       ×Ö·ûÃû³Æ        Unicode ±àÂë
\'        µ¥ÒýºÅ        0x0027
\"        Ë«Òýº ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ