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

c # 4.0

c# 4.0ÐÂÌØÐÔÒ»ÀÀ
ÖÕÓÚ¾²ÏÂÐÄÀ´×ÐϸÌýÁËÒ»±éAnders Hejlsberg£¨Visual Studio×éµÄTECHNICAL FELLOW£¬C#µÄÉè¼ÆÕßÖ®Ò»£©ÔÚPDC08ÉϽ²µÄ“The Future of C#”£¨http://channel9.msdn.com/pdc2008/TL16/£©¡£
»Ø¹ËC#·¢Õ¹µÄÀúÊ·£¬C#1.0ÍêÈ«ÊÇÄ£·ÂJava£¬²¢±£ÁôÁËC/C++µÄһЩÌØÐÔÈçstruct£¬ÐÂѧÕߺÜÈÝÒ×ÉÏÊÖ£»C#2.0¼ÓÈëÁË·ºÐÍ£¬Ò²ÓëJava1.5µÄ·ºÐÍÈç³öÒ»ÕÞ£»C#3.0¼ÓÈëÁËÒ»¶ÑÓï·¨ÌÇ£¬²¢ÔÚûÓÐÐÞ¸ÄCLRµÄÇé¿öÏÂÒýÈëÁËLinq£¬¼òÖ±ÊÇÉñÀ´Ö®±Ê£¬ËäÈ»ºÜ¶àÏîÄ¿³öÓÚ¸÷ÖÖ¸÷ÑùÈçÐÔÄÜÖ®ÀàµÄÔ­ÒòûÓвÉÓ㬵«·Ç³£ÊʺÏСÐͳÌÐòµÄ¿ìËÙ¿ª·¢£¬¼õÇáÁ˳ÌÐòÔ±µÄ¹¤×÷Á¿£¬Ò²Ìá¸ßÁË´úÂëµÄ¿É¶ÁÐÔ£»C#4.0Ôö¼ÓÁ˶¯Ì¬ÓïÑÔµÄÌØÐÔ£¬´ÓÀïÃæ¿ÉÒÔ¿´µ½ºÜ¶àjavascript¡¢pythonÕâЩ¶¯Ì¬ÓïÑÔµÄÓ°×Ó¡£ËäȻԽÀ´Ô½Æ«À뾲̬ÓïÑԵĵÀ·£¬µ«´ÓÁíÒ»¸ö½Ç¶ÈÀ´Ëµ£¬ÕâЩÌØÐÔÒ²¶¼ÊÇΪÁËÌá¸ß³ÌÐòÔ±µÄÉú²úÁ¦¡£ÖÁÓÚ±»½ÓÊÜÓë·ñ£¬»¹ÊÇÈÃʱ¼äÀ´Ëµ»°°É¡£

PS£ºÕâÀïÃ滹ÓÐÒ»µã°æ±¾ºÅµÄС²åÇú——VS2008Ëù¶ÔÓ¦µÄ.Net FrameworkÊÇ3.5£¬C#ÊÇ3.0£¬CLRÊÇ2.0£¬¼°Æä»ìÂÒ£¬MSÖÕÓÚϾöÐÄÔÚVS2010ÖаÑÕâÈý¸ö°æ±¾ºÅ¶¼Í³Ò»³ÉÁË4.0£¬ÓÚÊÇCLR3²»ÖªËùÖÕ……
Dynamically Typed Object
C#4.0¼ÓÈëÁËdynamic¹Ø¼ü×Ö£¬¿ÉÒÔÉêÃ÷Ò»¸ö±äÁ¿µÄstaticÀàÐÍΪdynamic£¨ÓеãÈÆ¿Ú£©¡£
ÔÚ3.0¼°Ö®Ç°£¬Èç¹ûÄã²»ÖªµÀÒ»¸ö±äÁ¿µÄÀàÐÍ£¬¶øҪȥµ÷ÓÃËüµÄÒ»¸ö·½·¨£¬Ò»°ã»áÓõ½·´É䣺
object calc = GetCalculator();
Type calcType = calc.GetType();
object res = calcType.InvokeMember("Add",
BindingFlags.InvokeMethod, null,
new object[] { 10, 20 });
int sum = Convert.ToInt32(res);
ÓÐÁËdynamic£¬¾Í¿ÉÒÔ°ÑÉÏÃæ´úÂë¼ò»¯Îª£º
dynamic calc = GetCalculator();
int sum = calc.Add(10, 20);
ʹÓÃdynamicµÄºÃ´¦ÔÚÓÚ£¬¿ÉÒÔ²»È¥¹ØÐĶÔÏóÊÇÀ´Ô´ÓÚCOM, IronPython, HTML DOM»òÕß·´É䣬ֻҪ֪µÀÓÐʲô·½·¨¿ÉÒÔµ÷ÓþͿÉÒÔÁË£¬Ê£ÏµĹ¤×÷¿ÉÒÔÁô¸øruntime¡£ÏÂÃæÊǵ÷ÓÃIronPythonÀàµÄÀý×Ó£º
ScriptRuntime py = Python.CreateRuntime();
dynamic helloworld = py.UseFile("helloworld.py");
Console.WriteLine("helloworld.py loaded!");
dynamicÒ²¿ÉÒÔÓÃÔÚ±äÁ¿µÄ´«µÝÖУ¬runtime»á×Ô¶¯Ñ¡ÔñÒ»¸ö×îÆ¥ÅäµÄoverload·½·¨¡£
ÕâÀïÓÐÒ»¸ödemo£º°ÑÒ»¶Îjavascript´úÂ뿽µ½C#ÎļþÖУ¬½«var¸Ä³Édynamic£¬function¸Ä³Évoid£¬ÔÙ¸ÄһϹ¹Ô캯ÊýµÄµ÷Ó÷½Ê½£¨new type()¸ÄΪwin.New.type()£©£¬È¥µôjavascriptÖеÄwin.ǰ׺£¨Òò


Ïà¹ØÎĵµ£º

C/C++——С±à̸CÓïÑÔº¯ÊýÄÇЩÊÂ(11)

C³ÌÐòÊÇÓÉÒ»×é»òÊDZäÁ¿»òÊǺ¯ÊýµÄÍⲿ¶ÔÏó×é³ÉµÄ¡£ º¯ÊýÊÇÒ»¸ö×ÔÎÒ°üº¬µÄÍê³ÉÒ»¶¨Ïà¹Ø¹¦ÄܵÄÖ´ÐдúÂë¶Î¡£ÏÂÃæС±àºÍ´ó¼Ò·ÖÏíÏÂCÓïÑÔÖеĺ¯Êý¡£
 
1. kbhitº¯Êý
 
kbhitº¯ÊýÊǼì²éµ±Ç°°´Ïµļü£¬ÆäÓ÷¨Îª£ºint kbhit(void);³ÌÐòÀý×ÓÈçÏ£º
#include <conio.h>
int main(void)
{
   c ......

ʹÓÃEclipse+MinGW¹¹½¨WindowsÉϵÄC/C++¿ª·¢»·¾³

Ç°ÑÔ
Eclipse×÷Ϊһ¿î¼«ÆäÓÅÐãµÄJava IDE£¬ÒѾ­µÃµ½¹ã·ºµÄÈÏ¿É¡£µ±È»Eclipse²¢²»ÏÞÓÚJava¿ª·¢£¬ÓÉÓÚÆäÓÅÐãµÄ»ù´¡¼Ü¹¹£¬EclipseÒѾ­³ÉΪһ¸ö¿ÉÒÔÈÝÄÉÒ»ÇÐÓ뿪·¢ÓйصŤ¾ßµÄƽ̨¡£
µ±È»ÈÝÄÉÒ»Çв¢²»Òâζ×ÅÊʺÏÓÚÒ»ÇС£ÏñC/C++ÕâÑùÔç¾Í´æÔڵIJ¢¹ã·ºÓ¦ÓõÄÓïÑÔ£¬Ôç¾ÍÓÐÒ»´óÅú¿ÉÓõÄIDE£¬Ò²ÓкܶàÈËϲ»¶ÓÃvi/emacs×÷Ϊ×Ô¼ºµÄ¿ ......

zz Emacs C

ÈÕÆÚ£º2009-11-21   10:54:22
±¾½ÚÖ÷Òª²Î¿¼£º
    ²ÜÀֵġ¶ÔÚEmacsÏÂÓÃC/C++±à³Ì¡·
    Íõ´¿ÒµµÄ¡¶Emacs Ò»¸öÇ¿´óµÄƽ̨¡·
    emacswiki.org
emcasÄÑѧÒ×Ó㬿ÉÀ©Õ¹ÐÔÇ¿¡£ÓÐÈË°ÑËýµ±×÷ÐÅÑö£¬ÓÐÈËÈÏΪËûÊÇħ¹í£¡Ñ§Ï°Ê×ÏȼÇס»ù±¾µÄ¼üÅÌ¿ì½Ý¼ü£¬Ñ§»á³£Óòå¼þ£¬ ......

¿ªÊ¼¶Á¡¶Cר¼Ò±à³Ì¡·

    Ç°Á½ÌìÔÚÍøÉÏ¿´µ½¡¶Cר¼Ò±à³Ì¡·Õâ±¾ÊéµÄÆÀ¼Û»¹²»´í£¬¾ÍÈ¥ÊéµêÂòÁËÒ»±¾»ØÀ´Åõ¶Á£¬Ã¿ÌìÍíÉÏ¿´Ò»Ð©¡£Ì½ÌÖµÄÎÊÌâȷʵ±È½ÏÉ¶¼ÔÚÌÖÂÛCÓïÑÔ±¾ÉíµÄÎÊÌâÁË¡£Ìáµ½ÁËCÓïÑÔÖеÄһЩ²»×ã¡£±¾À´ÈÏΪCÓïÑÔÊÇÎÞи¿É»÷µÄ£¬¿É´Ó×÷ÕߵĽǶȿ´À´£¬È·ÊµÓÐЩ²»Í׵ĵط½£¬ÏëÏëÒ²ÊÇ£¬ÄÄÓÐÍêÃÀÎÞȱ¶«Î÷ÄØ¡£Æäʵ×÷ÕßÒ²²¢·ÇÔڱᵠ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ