ÓÑÇéÌáʾ£ºÈç¹û±¾ÍøÒ³´ò¿ªÌ«Âý»òÏÔʾ²»ÍêÕû£¬Çë³¢ÊÔÊó±êÓÒ¼ü¡°Ë¢Ð¡±±¾ÍøÒ³£¡
¸»Ê¿¿µÐ¡ËµÍø ·µ»Ø±¾ÊéĿ¼ ¼ÓÈëÊéÇ© ÎÒµÄÊé¼Ü ÎÒµÄÊéÇ© TXTÈ«±¾ÏÂÔØ ¡ºÊղص½ÎÒµÄä¯ÀÀÆ÷¡»

VB2008´ÓÈëÃŵ½¾«Í¨(PDF¸ñʽӢÎÄ°æ)-µÚ63²¿·Ö

¿ì½Ý²Ù×÷: °´¼üÅÌÉÏ·½Ïò¼ü ¡û »ò ¡ú ¿É¿ìËÙÉÏÏ·­Ò³ °´¼üÅÌÉ쵀 Enter ¼ü¿É»Øµ½±¾ÊéĿ¼ҳ °´¼üÅÌÉÏ·½Ïò¼ü ¡ü ¿É»Øµ½±¾Ò³¶¥²¿! Èç¹û±¾ÊéûÓÐÔĶÁÍ꣬ÏëÏ´μÌÐø½Ó×ÅÔĶÁ£¬¿ÉʹÓÃÉÏ·½ "Êղص½ÎÒµÄä¯ÀÀÆ÷" ¹¦ÄÜ ºÍ "¼ÓÈëÊéÇ©" ¹¦ÄÜ£¡



¡¡¡¡¡¡

¡¡¡¡¡¡

¡¡¡¡¡¡¡¡¡¡

¡¡¡¡¡¡

¡¡¡¡¡¡



¡¡



¡¡¡¡¡¡¡¡¡¡The¡¡bolded¡¡section¡¡represents¡¡a¡¡new¡¡part¡¡of¡¡the¡¡configuration¡¡file¡¡that¡¡could¡¡be¡¡called¡¡¡¡

¡°configuring¡¡the¡¡configuration¡£¡±¡¡Any¡¡XML¡¡node¡¡that¡¡is¡¡within¡¡the¡¡¡¡section¡¡is¡¡¡¡

used¡¡to¡¡customize¡¡the¡¡configuration¡­parsing¡¡infrastructure¡£¡¡In¡¡the¡¡example£»¡¡the¡¡XML¡¡node¡¡¡¡

¡¡has¡¡two¡¡attributes¡¡that¡¡refer¡¡to¡¡what¡¡the¡¡configuration¡¡infrastructure¡¡should¡¡do¡¡¡¡

when¡¡it¡¡encounters¡¡a¡¡specific¡¡XML¡¡node¡£¡¡The¡¡attribute¡¡¡¡name¡¡specifies¡¡the¡¡name¡¡of¡¡the¡¡XML¡¡¡¡

node£»¡¡and¡¡the¡¡attribute¡¡type¡¡references¡¡a¡¡type¡¡£¨Definitions¡£LoaderSection£©¡¡and¡¡assembly¡¡¡¡

£¨Definitions£©¡¡that¡¡will¡¡process¡¡the¡¡XML¡¡node¡£¡¡

¡¡¡¡¡¡¡¡¡¡Step¡¡back¡¡and¡¡think¡¡about¡¡what¡¡is¡¡happening¡¡here¡£¡¡The¡¡XML¡¡node¡¡¡¡is¡¡used¡¡to¡¡¡¡

configure¡¡the¡¡configuration¡¡processor¡¡using¡¡dynamically¡¡loaded¡¡types¡£¡¡This¡¡demonstrates¡¡that¡¡¡¡

the¡¡process¡¡of¡¡dynamically¡¡loading¡¡and¡¡executing¡¡pieces¡¡of¡¡code¡¡is¡¡not¡¡rocket¡¡science£»¡¡but¡¡a¡¡¡¡

daily¡¡part¡¡of¡¡developing¡¡ponents¡¡in¡¡¡£¡¡



Marshaling¡¡the¡¡Configuration¡¡File¡¡Data¡¡



When¡¡you¡¡want¡¡to¡¡use¡¡a¡¡custom¡¡node¡¡in¡¡a¡¡configuration¡¡file£»¡¡you¡¡need¡¡to¡¡implement¡¡a¡¡class¡¡that¡¡¡¡

subclasses¡¡System¡£Configuration¡£ConfigurationSection¡£¡¡The¡¡purpose¡¡of¡¡the¡¡custom¡¡class¡¡is¡¡to¡¡¡¡

process¡¡and¡¡structure¡¡the¡¡data¡¡in¡¡the¡¡configuration¡¡file¡¡into¡¡something¡¡that¡¡the¡¡application¡¡can¡¡¡¡

manipulate¡£¡¡In¡¡other¡¡words£»¡¡we¡¡are¡¡marshaling¡¡the¡¡data¡¡from¡¡the¡¡configuration¡¡file¡¡to¡¡the¡¡¡¡¡¡

environment¡£¡¡Here¡¯s¡¡the¡¡start¡¡of¡¡our¡¡class£»¡¡which¡¡belongs¡¡in¡¡the¡¡Definitions¡¡assembly£º¡¡



Public¡¡Class¡¡LoaderSection¡¡

¡¡¡¡¡¡¡¡Inherits¡¡ConfigurationSection¡¡


¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­Page¡¡350¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­

328¡¡¡¡¡¡¡¡¡¡¡¡¡¡CH¡¡AP¡¡T¡¡E¡¡R¡¡¡¡¡¡1¡¡2¡¡¡¡¡¡¡ö¡¡¡¡¡¡¡¡L¡¡E¡¡A¡¡R¡¡N¡¡I¡¡N¡¡G¡¡¡¡¡¡A¡¡B¡¡OU¡¡T¡¡¡¡¡¡A¡¡PP¡¡L¡¡I¡¡CA¡¡TI¡¡O¡¡N¡¡¡¡¡¡CO¡¡N¡¡F¡¡I¡¡G¡¡U¡¡R¡¡AT¡¡IO¡¡N¡¡¡¡¡¡AN¡¡D¡¡¡¡¡¡D¡¡Y¡¡N¡¡A¡¡M¡¡I¡¡C¡¡¡¡L¡¡O¡¡AD¡¡I¡¡N¡¡G¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡The¡¡¡¡infrastructure¡¡helps¡¡you¡¡implement¡¡the¡¡marshaling¡¡routines¡¡by¡¡providing¡¡class¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡types¡¡that¡¡allow¡¡you¡¡to¡¡explicitly¡¡associate¡¡an¡¡XML¡¡attribute¡¡or¡¡keyword¡¡with¡¡some¡¡variable¡£¡¡For¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡example£»¡¡suppose¡¡you¡¡want¡¡to¡¡cross¡­reference¡¡the¡¡XML¡¡attribute¡¡easyname¡¡with¡¡a¡¡¡¡type¡£¡¡To¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡do¡¡so£»¡¡first¡¡define¡¡the¡¡nature¡¡and¡¡type¡¡of¡¡the¡¡property¡¡using¡¡the¡¡type¡¡ConfigurationProperty¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£¨this¡¡code¡¡goes¡¡in¡¡the¡¡LoaderSection¡¡class£©£º¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Dim¡¡_propEasyName¡¡As¡¡ConfigurationProperty¡¡=¡¡_¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡New¡¡ConfigurationProperty£¨¡¨easyname¡¨£»¡¡GetType£¨String£©£»¡¡Nothing£»¡¡_¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ConfigurationPropertyOptions¡£IsRequired£©¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡This¡¡example¡¡uses¡¡the¡¡ConfigurationProperty¡¡constructor¡¡that¡¡has¡¡four¡¡parameters£º¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡o¡¡¡¡¡¨easyname¡¨£º¡¡Identifies¡¡the¡¡XML¡¡attribute¡¡identifier¡¡that¡¡will¡¡be¡¡used¡£¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡o¡¡¡¡GetType£¨String£©£º¡¡Identifies¡¡the¡¡type¡¡of¡¡the¡¡attribute£»¡¡which¡¡could¡¡also¡¡include¡¡Double¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡and¡¡Integer¡¡to¡¡indicate¡¡a¡¡number¡£¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡o¡¡¡¡Nothing£º¡¡Identifies¡¡the¡¡default¡¡value¡¡of¡¡the¡¡attribute¡¡if¡¡the¡¡attribute¡¡is¡¡not¡¡present¡¡in¡¡the¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡XML¡¡configuration¡¡file¡£¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡o¡¡¡¡ConfigurationPropertyOptions¡£IsRequired£º¡¡Identifies¡¡some¡¡characteristics¡¡of¡¡the¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡attribute£»¡¡in¡¡the¡¡case¡¡of¡¡this¡¡example£»¡¡the¡¡attribute¡¡is¡¡required¡£¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡öNote¡¡¡¡There¡¡are¡¡multiple¡¡constructors¡¡for¡¡ConfigurationProperty¡£¡¡For¡¡more¡¡information£»¡¡check¡¡out¡¡the¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡MSDN¡¡documentation¡¡£¨http£º//msdn2¡£microsoft¡£/en¡­us/library/system¡£configuration¡£¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡configurationproperty¡£configurationproperty¡£aspx£©¡£¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Once¡¡you¡¡have¡¡defined¡¡a¡¡property£»¡¡you¡¡need¡¡to¡¡cross¡­reference¡¡it¡¡with¡¡a¡¡property¡¡and¡¡the¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡base¡¡class¡¡ConfigurationSection¡¡£¨again£»¡¡this¡¡code¡¡goes¡¡in¡¡the¡¡¡¡LoaderSection¡¡class£©£º¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡_¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Public¡¡ReadOnly¡¡Property¡¡EasyName£¨£©¡¡As¡¡String¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Get¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Return¡¡CStr£¨MyBase¡£Item£¨_propEasyName£©£©¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡End¡¡Get¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡End¡¡Property¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Whenever¡¡you¡¡reference¡¡the¡¡property¡¡EasyName£»¡¡the¡¡attributes¡¡associated¡¡with¡¡the¡¡property¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡provide¡¡a¡¡cross¡­reference¡¡with¡¡the¡¡configuration¡¡file¡£¡¡Whenever¡¡the¡¡property¡¡is¡¡called£»¡¡the¡¡base¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡indexer¡¡with¡¡data¡¡member¡¡that¡¡references¡¡ConfigurationProperty¡¡is¡¡called¡¡and¡¡marshals¡¡the¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡data¡¡from¡¡the¡¡configuration¡¡file¡¡to¡¡the¡¡¡¡type¡£¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡The¡¡plete¡¡implementation¡¡used¡¡to¡¡process¡¡the¡¡XML¡¡node¡¡¡¡is¡¡as¡¡follows¡¡£¨added¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡to¡¡the¡¡Definitions¡¡assembly£©£º¡¡


¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­Page¡¡351¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡CH¡¡AP¡¡T¡¡E¡¡R¡¡¡¡¡¡1¡¡2¡¡¡¡¡¡¡ö¡¡¡¡¡¡¡¡L¡¡E¡¡AR¡¡N¡¡IN¡¡G¡¡¡¡¡¡AB¡¡O¡¡U¡¡T¡¡¡¡¡¡AP¡¡P¡¡L¡¡I¡¡CAT¡¡I¡¡ON¡¡¡¡¡¡CO¡¡N¡¡F¡¡IG¡¡U¡¡R¡¡AT¡¡IO¡¡N¡¡¡¡¡¡A¡¡N¡¡D¡¡¡¡¡¡D¡¡Y¡¡N¡¡A¡¡M¡¡IC¡¡¡¡¡¡L¡¡O¡¡AD¡¡IN¡¡G¡¡329¡¡



Imports¡¡System¡£Configuration¡¡



Public¡¡Class¡¡LoaderSection¡¡

¡¡¡¡¡¡¡¡Inherits¡¡ConfigurationSection¡¡



¡¡¡¡¡¡¡¡Private¡¡Shared¡¡_propAssemblyName¡¡As¡¡ConfigurationProperty¡¡=¡¡_¡¡

¡¡¡¡¡¡¡¡¡¡¡¡New¡¡ConfigurationProperty£¨¡¨assemblyname¡¨£»¡¡GetType£¨String£©£»¡¡Nothing£»¡¡_¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ConfigurationPropertyOptions¡£IsRequired£©¡¡

¡¡¡¡¡¡¡¡Private¡¡Shared¡¡_propEasyName¡¡As¡¡ConfigurationProperty¡¡=¡¡_¡¡

¡¡¡¡¡¡¡¡¡¡¡¡New¡¡ConfigurationProperty£¨¡¨easyname¡¨£»¡¡GetType£¨String£©£»¡¡Nothing£»¡¡_¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ConfigurationPropertyOptions¡£IsRequired£©¡¡

¡¡¡¡¡¡¡¡Private¡¡Shared¡¡_properties¡¡As¡¡ConfigurationPropertyCollection¡¡=¡¡_¡¡

¡¡¡¡¡¡¡¡¡¡¡¡New¡¡ConfigurationPropertyCollection£¨£©¡¡

¡¡¡¡¡¡¡¡Private¡¡Shared¡¡_propTypeName¡¡As¡¡ConfigurationProperty¡¡=¡¡_¡¡

¡¡¡¡¡¡¡¡¡¡¡¡New¡¡ConfigurationProperty£¨¡¨typename¡¨£»¡¡GetType£¨String£©£»¡¡Nothing£»¡¡_¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ConfigurationPropertyOptions¡£IsRequired£©¡¡



¡¡¡¡¡¡¡¡Shared¡¡Sub¡¡New£¨£©¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡_properties¡£Add£¨_propAssemblyName£©¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡_properties¡£Add£¨_propEasyName£©¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡_properties¡£Add£¨_propTypeName£©¡¡

¡¡¡¡¡¡¡¡End¡¡Sub¡¡



¡¡¡¡¡¡¡¡¡¡_¡¡

¡¡¡¡¡¡¡¡Public¡¡ReadOnly¡¡Property¡¡AssemblyName£¨£©¡¡As¡¡String¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Get¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Return¡¡CStr£¨MyBase¡£Item£¨_propAssemblyName£©£©¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡End¡¡Get¡¡

¡¡¡¡¡¡¡¡End¡¡Property¡¡



¡¡¡¡¡¡¡¡¡¡_¡¡

¡¡¡¡¡¡¡¡Public¡¡ReadOnly¡¡Property¡¡EasyName£¨£©¡¡As¡¡String¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Get¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Return¡¡CStr£¨MyBase¡£Item£¨_propEasyName£©£©¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡End¡¡Get¡¡

¡¡¡¡¡¡¡¡End¡¡Property¡¡



¡¡¡¡¡¡¡¡¡¡_¡¡

¡¡¡¡¡¡¡¡Public¡¡ReadOnly¡¡Property¡¡TypeName£¨£©¡¡As¡¡String¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Get¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Return¡¡CStr£¨MyBase¡£Item£¨_propTypeName£©£©¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡End¡¡Get¡¡

¡¡¡¡¡¡¡¡End¡¡Property¡¡

End¡¡Class¡¡


¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­Page¡¡352¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­

330¡¡¡¡¡¡¡¡¡¡¡¡¡¡CH¡¡AP¡¡T¡¡E¡¡R¡¡¡¡¡¡1¡¡2¡¡¡¡¡¡¡ö¡¡¡¡¡¡¡¡L¡¡E¡¡A¡¡R¡¡N¡¡I¡¡N¡¡G¡¡¡¡¡¡A¡¡B¡¡OU¡¡T¡¡¡¡¡¡A¡¡PP¡¡L¡¡I¡¡CA¡¡TI¡¡O¡¡N¡¡¡¡¡¡CO¡¡N¡¡F¡¡I¡¡G¡¡U¡¡R¡¡AT¡¡IO¡¡N¡¡¡¡¡¡AN¡¡D¡¡¡¡¡¡D¡¡Y¡¡N¡¡A¡¡M¡¡I¡¡C¡¡¡¡L¡¡O¡¡AD¡¡I¡¡N¡¡G¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡The¡¡¡¡LoaderSection¡¡class¡¡does¡¡two¡¡jobs£º¡¡it¡¡tells¡¡the¡¡underlying¡¡configuration¡¡infrastructure¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡what¡¡¡¡LoaderSection¡¡is¡¡interested¡¡in£»¡¡and¡¡it¡¡provides¡¡an¡¡easy¡­to¡­use¡¡API¡¡to¡¡the¡¡configuration¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡data¡£¡¡The¡¡first¡¡job¡¡is¡¡nice¡¡to¡¡have¡¡done£»¡¡but¡¡the¡¡second¡¡is¡¡absolutely¡¡essential¡£¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡To¡¡understand¡¡what¡¡happens£»¡¡let¡¯s¡¡see¡¡an¡¡example¡¡of¡¡retrieving¡¡the¡¡values¡¡from¡¡a¡¡configu

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ration¡¡file¡£¡¡¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Reading¡¡the¡¡Enhanced¡¡Configuration¡¡File¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡As¡¡you¡¯ve¡¡seen£»¡¡the¡¡¡¡element¡¡declares¡¡a¡¡custom¡¡XML¡¡node¡¡that£»¡¡when¡¡encoun

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡tered£»¡¡instantiates¡¡a¡¡specific¡¡type¡ª¡¡LoaderSection¡¡is¡¡instantiated¡¡in¡¡this¡¡example¡£¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡The¡¡values¡¡are¡¡retrieved¡¡from¡¡the¡¡custom¡¡configuration¡¡as¡¡follows£º¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡o¡¡¡¡The¡¡configuration¡¡infrastructure¡¡reads¡¡the¡¡various¡¡attributes£»¡¡such¡¡as¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡o¡¡¡¡The¡¡configuration¡¡infrastructure¡¡does¡¡a¡¡cross¡­reference¡¡of¡¡which¡¡attributes¡¡exist¡¡and¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡if¡¡they¡¡are¡¡required¡£¡¡Think¡¡of¡¡this¡¡step¡¡as¡¡the¡¡bookkeeping¡¡of¡¡the¡¡custom¡¡configuration¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡information¡£¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡o¡¡¡¡The¡¡configuration¡¡infrastructure¡¡waits¡¡for¡¡the¡¡application¡¡code¡¡to¡¡call¡¡the¡¡properties¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡EasyName£»¡¡TypeName£»¡¡or¡¡AssemblyName¡£¡¡In¡¡the¡¡implementation¡¡of¡¡the¡¡individual¡¡properties£»¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡the¡¡MyBase¡¡indexer¡¡£¨such¡¡as¡¡MyBase¡£Item£¨_propTypeName£©¡¡from¡¡¡¡LoaderSection¡£TypeName£©¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡is¡¡referenced£»¡¡and¡¡the¡¡value¡¡of¡¡the¡¡configuration¡¡item¡¡is¡¡retrieved¡¡using¡¡the¡¡property¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡descriptors¡¡declared¡¡as¡¡shared¡¡members¡£¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡We¡¡can¡¡use¡¡the¡¡following¡¡code¡¡to¡¡read¡¡the¡¡custom¡¡configuration¡¡item¡¡£¨added¡¡to¡¡the¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Definitions¡¡assembly£©¡£¡¡This¡¡code¡¡is¡¡an¡¡example¡¡of¡¡replacing¡¡the¡¡previously¡¡declared¡¡¡¡Load£¨£©¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡functionality¡£¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Public¡¡Sub¡¡Load£¨£©¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Dim¡¡loader¡¡As¡¡LoaderSection¡¡=¡¡_¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡CType£¨ConfigurationManager¡£GetSection£¨¡¨loader¡¨£©£»¡¡LoaderSection£©¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡If¡¡loader¡¡IsNot¡¡Nothing¡¡Then¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Dim¡¡configInfo¡¡As¡¡ConfigurationInfo¡¡=¡¡_¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡New¡¡ConfigurationInfo£¨£©¡¡With¡¡£û¡¡_¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£EasyName¡¡=¡¡loader¡£EasyName£»¡¡_¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£TypeName¡¡=¡¡loader¡£TypeName£»¡¡_¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡£AssemblyName¡¡=¡¡loader¡£AssemblyName£ý¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡_availableTypes¡£Add£¨loader¡£EasyName£»¡¡configInfo£©¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡End¡¡If¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡End¡¡Sub¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡The¡¡only¡¡major¡¡difference¡¡between¡¡this¡¡code¡¡and¡¡the¡¡previous¡¡¡¡Load£¨£©¡¡code¡¡is¡¡the¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ConfigurationManager¡¡reference¡£¡¡In¡¡the¡¡previous¡¡¡¡Load£¨£©¡¡implementation£»¡¡it¡¡was¡¡assumed¡¡that¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡all¡¡configuration¡¡settings¡¡were¡¡stored¡¡in¡¡the¡¡¡¡section¡£¡¡This¡¡time£»¡¡we¡¡retrieve¡¡the¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡section£»¡¡which¡¡is¡¡defined¡¡to¡¡be¡¡the¡¡type¡¡¡¡LoaderSection¡£¡¡We¡¡still¡¡create¡¡all¡¡available¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡types¡¡using¡¡the¡¡_availableTypes¡¡dictionary¡¡collection£»¡¡but¡¡the¡¡parsing¡¡and¡¡breaking¡¡apart¡¡of¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡the¡¡various¡¡buffers¡¡are¡¡not¡¡necessary¡£¡¡


¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­Page¡¡353¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡CH¡¡AP¡¡T¡¡E¡¡R¡¡¡¡¡¡1¡¡2¡¡¡¡¡¡¡ö¡¡¡¡¡¡¡¡L¡¡E¡¡AR¡¡N¡¡IN¡¡G¡¡¡¡¡¡AB¡¡O¡¡U¡¡T¡¡¡¡¡¡AP¡¡P¡¡L¡¡I¡¡CAT¡¡I¡¡ON¡¡¡¡¡¡CO¡¡N¡¡F¡¡IG¡¡U¡¡R¡¡AT¡¡IO¡¡N¡¡¡¡¡¡A¡¡N¡¡D¡¡¡¡¡¡D¡¡Y¡¡N¡¡A¡¡M¡¡IC¡¡¡¡¡¡L¡¡O¡¡AD¡¡IN¡¡G¡¡331¡¡



¡öNote¡¡¡¡Writing¡¡your¡¡own¡¡configuration¡¡section¡¡is¡¡not¡¡that¡¡difficult£»¡¡but¡¡it¡¡is¡¡tedious¡£¡¡It¡¡is¡¡tedious¡¡because¡¡you¡¡¡¡

need¡¡to¡¡explicitly¡¡tell¡¡the¡¡configuration¡¡infrastructure¡¡what¡¡every¡¡item¡¡means¡¡and¡¡how¡¡you¡¡will¡¡use¡¡it¡£¡¡There¡¡is¡¡¡¡

no¡¡simple¡¡way¡¡to¡¡get¡¡around¡¡this£»¡¡because¡¡the¡¡configuration¡¡infrastructure¡¡needs¡¡to¡¡know¡¡which¡¡configuration¡¡¡¡

items¡¡should¡¡be¡¡processed¡¡and¡¡how¡¡they¡¡should¡¡be¡¡processed¡£¡¡Thus£»¡¡to¡¡implement¡¡a¡¡configuration¡¡section¡¡¡¡

with¡¡multiple¡¡items£»¡¡you¡¡will¡¡need¡¡to¡¡use¡¡more¡¡pieces¡¡of¡¡the¡¡predefined¡¡configuration¡¡infrastructure¡¡in¡¡the¡¡¡¡

same¡¡manner¡¡as¡¡illustrated¡¡by¡¡this¡¡simple¡¡example¡£¡¡See¡¡the¡¡¡¡configuration¡¡infrastructure¡¡documentation£»¡¡¡¡

at¡¡http£º//support¡£microsoft¡£/kb/313405/EN¡­US/£»¡¡for¡¡more¡¡information¡£¡¡



Loading¡¡a¡¡Strongly¡¡Named¡¡Assembly¡¡



In¡¡the¡¡previous¡¡section£»¡¡the¡¡example¡¡demonstrated¡¡the¡¡dynamic¡¡loading¡¡technique¡¡in¡¡which¡¡¡¡

you¡¡explicitly¡¡define¡¡where¡¡the¡¡assembly¡¡is¡¡and¡¡then¡¡instantiate¡¡a¡¡type¡¡in¡¡that¡¡assembly¡£¡¡Another¡¡¡¡

approach¡¡to¡¡instantiating¡¡an¡¡assembly¡¡involves¡¡using¡¡the¡¡formal¡¡declaration¡¡of¡¡a¡¡type¡£¡¡

¡¡¡¡¡¡¡¡¡¡¡¡In¡¡£»¡¡there¡¡is¡¡an¡¡easy¡¡way¡¡to¡¡reference¡¡an¡¡assembly¡¡and¡¡a¡¡more¡¡difficult¡¡way¡¡to¡¡reference¡¡an¡¡¡¡

assembly¡£¡¡This¡¡is¡¡analogous¡¡to¡¡the¡¡easy¡¡way¡¡to¡¡identify¡¡a¡¡person¡¡and¡¡the¡¡more¡¡plicated¡¡way¡£¡¡¡¡

The¡¡easy¡¡way¡¡to¡¡identify¡¡me¡¡is¡¡to¡¡use¡¡my¡¡name£»¡¡Christian¡¡Gross£»¡¡and¡¡that¡¡works¡¡to¡¡a¡¡degree¡£¡¡The¡¡¡¡

problem¡¡is¡¡that¡¡I¡¯m¡¡not¡¡the¡¡only¡¡Christian¡¡Gross¡¡on¡¡this¡¡planet¡£¡¡The¡¡precise¡¡way¡¡to¡¡find¡¡me¡¡is¡¡to¡¡¡¡

look¡¡at¡¡my¡¡passport¡£¡¡The¡¡passport¡¡approach¡¡works£»¡¡but¡¡it¡¡has¡¡a¡¡long£»¡¡ugly¡¡number¡¡that¡¡is¡¡hard¡¡¡¡

to¡¡remember¡£¡¡

¡¡¡¡¡¡¡¡¡¡¡¡The¡¡assembly¡¡name¡¡Implementations2¡£dll¡¡is¡¡a¡¡simple¡¡assembly¡¡identifier¡¡like¡¡Christian¡¡Gross¡£¡¡¡¡

The¡¡following¡¡is¡¡the¡¡precise¡¡¡¡identifier¡¡of¡¡the¡¡assembly¡£¡¡



Implementations2£»¡¡Version=1¡£0¡£0¡£0£»¡¡Culture=neutral£»¡¡PublicKeyToken=6bc4c8c27c08ba48¡¡



¡¡¡¡¡¡¡¡¡¡¡¡The¡¡identifier¡¡is¡¡quite¡¡a¡¡mouthful£»¡¡but¡¡it¡¡says¡¡everything¡¡you¡¡need¡¡to¡¡know¡£¡¡This¡¡specifies¡¡¡¡

the¡¡name¡¡as¡¡Implementations2£»¡¡the¡¡version¡¡number£»¡¡the¡¡culture¡¡£¨bination¡¡of¡¡language¡¡and¡¡¡¡

country£©£»¡¡and¡¡a¡¡fixed¡­signed¡¡identifier¡£¡¡When¡¡culture¡¡is¡¡defined¡¡as¡¡neutral£»¡¡it¡¡means¡¡that¡¡only¡¡¡¡

the¡¡language¡¡is¡¡taken¡¡into¡¡account¡¡and¡¡not¡¡the¡¡country¡­specific¡¡bit¡£¡¡For¡¡example£»¡¡if¡¡the¡¡culture¡¡¡¡

is¡¡en¡­CA£»¡¡with¡¡neutral£»¡¡the¡¡CA¡¡bit¡¡will¡¡be¡¡ignored£»¡¡which¡¡means¡¡a¡¡neutral¡¡form¡¡of¡¡English£»¡¡known¡¡¡¡

in¡¡this¡¡context¡¡as¡¡international¡¡English£»¡¡will¡¡be¡¡used¡£¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡Using¡¡all¡¡of¡¡these¡¡attributes£»¡¡you¡¡can¡¡uniquely¡¡identify¡¡an¡¡assembly¡£¡¡This¡¡lets¡¡you¡¡load¡¡a¡¡¡¡

specific¡¡version¡¡of¡¡the¡¡assembly£»¡¡allowing¡¡multiple¡¡similar¡¡assemblies¡¡to¡¡be¡¡loaded¡¡simulta

neously¡£¡¡This¡¡specific¡¡referencing¡¡lets¡¡you¡¡to¡¡use¡¡ponents¡¡according¡¡to¡¡version¡¡and¡¡language¡£¡¡

¡¡¡¡¡¡¡¡¡¡¡¡The¡¡extra¡¡information¡¡is¡¡specified¡¡in¡¡the¡¡source¡¡code¡¡file¡¡AssemblyInfo¡£vb¡£¡¡If¡¡you¡¡want¡¡to¡¡edit¡¡¡¡

this¡¡file£»¡¡select¡¡the¡¡project¡¡and¡¡then¡¡choose¡¡Project¡¡¡¡Show¡¡All¡¡Files¡£¡¡You¡¯ll¡¡find¡¡the¡¡AssemblyInfo¡£vb¡¡¡¡

file¡¡under¡¡the¡¡My¡¡Project¡¡node¡¡in¡¡the¡¡Solution¡¡Explorer¡£¡¡Following¡¡is¡¡the¡¡plete¡¡implementation¡¡¡¡

for¡¡Implementations2¡£dll¡£¡¡



Imports¡¡System¡¡

Imports¡¡System¡£Reflection¡¡

Imports¡¡System¡£Runtime¡£InteropServices¡¡



¡¡'¡¡General¡¡Information¡¡about¡¡an¡¡assembly¡¡is¡¡controlled¡¡through¡¡the¡¡following¡¡¡¡

¡¡'¡¡set¡¡of¡¡attributes¡£¡¡Change¡¡these¡¡attribute¡¡values¡¡to¡¡modify¡¡the¡¡information¡¡

¡¡'¡¡associated¡¡with¡¡an¡¡assembly¡£¡¡


¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­Page¡¡354¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­

332¡¡¡¡¡¡¡¡¡¡¡¡¡¡CH¡¡AP¡¡T¡¡E¡¡R¡¡¡¡¡¡1¡¡2¡¡¡¡¡¡¡ö¡¡¡¡¡¡¡¡L¡¡E¡¡A¡¡R¡¡N¡¡I¡¡N¡¡G¡¡¡¡¡¡A¡¡B¡¡OU¡¡T¡¡¡¡¡¡A¡¡PP¡¡L¡¡I¡¡CA¡¡TI¡¡O¡¡N¡¡¡¡¡¡CO¡¡N¡¡F¡¡I¡¡G¡¡U¡¡R¡¡AT¡¡IO¡¡N¡¡¡¡¡¡AN¡¡D¡¡¡¡¡¡D¡¡Y¡¡N¡¡A¡¡M¡¡I¡¡C¡¡¡¡L¡¡O¡¡AD¡¡I¡¡N¡¡G¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡'¡¡Review¡¡the¡¡values¡¡of¡¡the¡¡assembly¡¡attributes¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡'The¡¡following¡¡GUID¡¡is¡¡for¡¡the¡¡ID¡¡of¡¡the¡¡typelib¡¡if¡¡this¡¡project¡¡is¡¡exposed¡¡to¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡



¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡'¡¡Version¡¡information¡¡for¡¡an¡¡assembly¡¡consists¡¡of¡¡the¡¡following¡¡four¡¡values£º¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡'¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡'¡¡¡¡¡¡¡¡¡¡¡¡Major¡¡Version¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡'¡¡¡¡¡¡¡¡¡¡¡¡Minor¡¡Version¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡'¡¡¡¡¡¡¡¡¡¡¡¡Build¡¡Number¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡'¡¡¡¡¡¡¡¡¡¡¡¡Revision¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡'¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡'¡¡You¡¡can¡¡specify¡¡all¡¡the¡¡values¡¡or¡¡you¡¡can¡¡default¡¡the¡¡Build¡¡and¡¡Revision¡¡Numbers¡¡¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡'¡¡by¡¡using¡¡the¡¡'*'¡¡as¡¡shown¡¡here£º¡¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡'¡¡¡¡¡¡


·µ»ØĿ¼ ÉÏÒ»Ò³ ÏÂÒ»Ò³ »Øµ½¶¥²¿ ÔÞ£¨11£© ²È£¨11£©
¿ì½Ý²Ù×÷: °´¼üÅÌÉÏ·½Ïò¼ü ¡û »ò ¡ú ¿É¿ìËÙÉÏÏ·­Ò³ °´¼üÅÌÉ쵀 Enter ¼ü¿É»Øµ½±¾ÊéĿ¼ҳ °´¼üÅÌÉÏ·½Ïò¼ü ¡ü ¿É»Øµ½±¾Ò³¶¥²¿!
ÎÂÜ°Ìáʾ£º ο´Ð¡ËµµÄͬʱ·¢±íÆÀÂÛ£¬Ëµ³ö×Ô¼ºµÄ¿´·¨ºÍÆäËüС»ï°éÃÇ·ÖÏíÒ²²»´íŶ£¡·¢±íÊéÆÀ»¹¿ÉÒÔ»ñµÃ»ý·ÖºÍ¾­Ñé½±Àø£¬ÈÏÕæдԭ´´ÊéÆÀ ±»²ÉÄÉΪ¾«ÆÀ¿ÉÒÔ»ñµÃ´óÁ¿½ð±Ò¡¢»ý·ÖºÍ¾­Ñé½±ÀøŶ£¡