C#ÀàºÍC#½á¹¹ÌåµÄ¹Øϵ
C#ÀࣺÀàÊÇC# Öй¦ÄÜ×îΪǿ´óµÄÊý¾ÝÀàÐÍ£¬ÀàÒ²¶¨ÒåÁËÊý¾ÝÀàÐ͵ÄÊý¾ÝºÍÐÐΪ¡£È»ºó£¬³ÌÐòÔ±¿ÉÒÔ´´½¨×÷Ϊ´ËÀàµÄʵÀýµÄ¶ÔÏó¡£
C#½á¹¹Ì壺½á¹¹ÌåÊÇÇáÁ¿Ð͵ÄÀ࣬ʹÓÿªÏúÏà¶ÔÓÚÀà½ÏС¡£
C#ÀàºÍC#½á¹¹ÌåÁ½ÕߵĹØϵ£º
1.Êý¾ÝÀàÐÍ£ºÀàºÍ½á¹¹Ì嶼ÊÇÊý¾ÝÀàÐÍ£¬ÀàÊÇÒýÓÃÀàÐÍ£¬½á¹¹ÌåÊÇÖµÀàÐÍ¡£
2.¼Ì³ÐÐÔ£ºÀà¿ÉÒԼ̳кͱ»¼Ì³Ð£¬¶ø½á¹¹ÌåÒþʽ¼Ì³ÐÓÚobject£¬²»¿ÉÒԼ̳У¨³ý½Ó¿ÚÒÔÍ⣩ºÍ±»¼Ì³Ð
3.¹¹Ô캯Êý£ºÀàºÍ½á¹¹Ì嶼ÓÐĬÈÏ(ÎÞ²Î)¹¹Ô캯Êý£¬Ö»²»¹ý½á¹¹Ìå²»ÄÜÏÔʾÉùÃ÷ĬÈÏ(ÎÞ²Î)¹¹Ô캯Êý£¬
4.×ֶγõʼ»¯£ºÀà¿ÉÒÔ¶Ô×Ö¶ÎÉùÃ÷ʱ¸³Öµ³õʼ»¯£¬¶ø½á¹¹Ìå²»¿ÉÒÔ(³ýconstºÍstaticÖ®Íâ)£¬½á¹¹ÌåµÄ×ֶαØÐëÔÚ¹¹Ô캯ÊýÖнøÐгõʼ»¯¡£
5.ʵÀý»¯£º½á¹¹ÌåʵÀý»¯Ê±¿ÉÒÔ²»Ê¹ÓÃnew£¬£¬Èç¹û²»Ê¹ÓÃnew£¬ÄÇôÔÚ³õʼ»¯ËùÓÐ×Ö¶Î֮ǰ£¬×ֶν«±£³Öδ¸³Öµ×´Ì¬ÇÒ¶ÔÏ󲻿ÉÓ᣶øÀà±ØÐëʹÓÃnew½øÐÐʵÀý»¯¡£
ÈçºÎÑ¡ÔñC#½á¹¹Ì廹ÊÇC#Àà
ÌÖÂÛÁ˽ṹÓëÀàµÄÏà֮ͬ´¦ºÍ²î±ðÖ®ºó£¬ÏÂÃæÌÖÂÛÈçºÎÑ¡ÔñʹÓýṹ»¹ÊÇÀࣺ
1£®¶ÑÕ»µÄ¿Õ¼äÓÐÏÞ£¬¶ÔÓÚ´óÁ¿µÄÂß¼µÄ¶ÔÏ󣬴´½¨ÀàÒª±È´´½¨½á¹¹ºÃһЩ
2£®½á¹¹±íʾÈçµã¡¢¾ØÐκÍÑÕÉ«ÕâÑùµÄÇáÁ¿¶ÔÏó£¬ÀýÈ磬Èç¹ûÉùÃ÷Ò»¸öº¬ÓÐ 1000 ¸öµã¶ÔÏóµÄÊý×飬Ôò½«ÎªÒýÓÃÿ¸ö¶ÔÏó·ÖÅ丽¼ÓµÄÄÚ´æ¡£ÔÚ´ËÇé¿öÏ£¬½á¹¹µÄ³É±¾½ÏµÍ¡£
3£®ÔÚ±íÏÖ³éÏóºÍ¶à¼¶±ðµÄ¶ÔÏó²ã´Îʱ£¬ÀàÊÇ×îºÃµÄÑ¡Ôñ
4£®´ó¶àÊýÇé¿öϸÃÀàÐÍÖ»ÊÇһЩÊý¾Ýʱ£¬½á¹¹Ê±×î¼ÑµÄÑ¡Ôñ ,struct ÀàÐÍÊÇÒ»ÖÖÖµÀàÐÍ£¬Í¨³£ÓÃÀ´·âװСÐÍÏà¹Ø±äÁ¿×飬ÀýÈ磬¾ØÐεÄ×ø±ê»ò¿â´æÉÌÆ·µÄÌØÕ÷¡£
Ïà¹ØÎĵµ£º
ͨ¹ý·´É䣬µÃµ½Õë¶Ôijһö¾ÙÀàÐ͵ÄÃèÊö¡£
ö¾ÙµÄ¶¨ÒåÖмÓÈëÃèÊö
using System;
using System.Collections;
namespace Ahnlab.ApplicationServices
{
public sealed partial class SysEnums
{
#region ϵͳ¹ÜÀíÄ£¿éµÄö¾ÙÐÅÏ¢
/// <summary>
/// ÔÚÏß²»Á¼Åâ³ ......
ÎÒÒÔΪ£¬ÔÚËùÓÐģʽÖУ¬×î¼òµ¥¡¢×î³£ÓõľÍÊǹ¤³§Ä£Ê½ÁË£¨°üÀ¨³éÏ󹤳§£©¡£
¹¤³§Ä£Ê½ºÍ³éÏóģʽµÄÇø±ðÔÚÓÚ£¬¹¤³§Ä£Ê½ÊÇͨ¹ý²ÎÊý£¨Ò»°ã½ÐÐͱðÂ룩À´¶¯Ì¬Éú³É¶ÔÏ󣬶ø³éÏ󹤳§±ØÐëÁ˽âÉÏÏÂÎIJÅÄܵ÷ÓÃÏàÓ¦µÄ¶ÔÏó¡£ÊµÀý´úÂëÈçÏ£º
Ò»¡¢¹¤³§Ä£Ê½
public class Factory
{
public static object Create(int type)
{
......
ÒýÓõØÖ·:http://www.cnblogs.com/heyaowen163/articles/1177909.html
C#¹Ø¼ü×ÖµÄÓ÷¨²»µ¥Ö»ÓÐÒ»ÖÖ·½·¨µÄ¡£ÏÖÔÚÎÒ×ܽáÁËÒ»ÏÂUsingºÍNewµÄÓ÷¨£¬Ë³±ã¹®¹ÌÏÂ×Ô¼ºµÄ֪ʶ¡£
Using
£¨1£©ÒýÓÃÃüÃû¿Õ¼ä
using× ......
1.c++µÄµ½´¦º¯ÊýÖ»ÒªÔÚº¯ÊýÉêÃ÷µÄʱºò¼Ó¸öµ¼³ö¹Ø¼ü×־ͿÉÒÔÁË
2.²ÎÊýÀàÐÍÎÊÌâ,
Ò»°ãµÄc++ÖÐchar * ¶ÔÓ¦ c#ÖеÄstring
¶øc++ÖÐ char **ÀàÐ͵IJÎÊý¶ÔÓ¦c#ÖÐ ref string ÕâÖÖÒ»°ã¶¼ÊÇÓÃÀ´·µ»Ø×Ö·û´®µÄ!
3.º¯ÊýÈë¿ÚÎÊÌâ,Ò»°ã»á³öÏÖ "ÕÒ²»µ½Èë¿Úµã" Õâ¸öÎÊÌâ²»ÊÇÓÉÄãÒýÆðµÄ,¶øÊÇϵͳ×Ô¼º°ÑÃû×Ö¸ÄÁË,¸Ä³ÉʲôÑùµÄÃû×Ö½¨ÒéÄãÓà ......
[SerializableAttribute]
[ComVisibleAttribute(true)]
[ClassInterfaceAttribute(ClassInterfaceType.AutoDual)]
public class Object
1 public virtual bool Equels (Object)
2 public static bool static Equels (Object,Object)
ĬÈÏʵÏÖΪ¶ÔÒýÓÃÀàÐÍʹÓÃÒýÓÃÏàµÈ£¬¶ÔÖµÀàÐÍʹÓöþ½øÖÆ°´Î»ÏàµÈ¡£ÒýÓÃÏàµÈÐÔÊÇÖ¸½ø ......