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

c# enmu ö¾ÙС½á(2)×Ô¼ºµÄ

ͨ¹ý·´É䣬µÃµ½Õë¶Ôijһö¾ÙÀàÐ͵ÄÃèÊö¡£
ö¾ÙµÄ¶¨ÒåÖмÓÈëÃèÊö
  using System;
using System.Collections;
namespace Ahnlab.ApplicationServices
{
public sealed partial class SysEnums
{


#region ϵͳ¹ÜÀíÄ£¿éµÄö¾ÙÐÅÏ¢
/// <summary>
/// ÔÚÏß²»Á¼Å⳥ЭÒéÊé״̬
/// </summary>
public enum YesNo
{
[TextAttribute("ÊÇ")]
Yes = 0,
[TextAttribute("·ñ")]
No = 1
}
/// <summary>
/// Óû§ÀàÐÍ
/// </summary>
public enum UserType
{
[TextAttribute("¹«Ë¾Ô±¹¤")]
Employee = 1,
[TextAttribute("´úÀíÉÌ")]
Agent = 2,
[TextAttribute("¹©Ó¦ÉÌ")]
Vendor = 3,
[TextAttribute("ϵͳ¹ÜÀíÔ±")]
Admin = 4
}
/// <summary>
/// ÃÜÂëÖØÖñê¼Ç
/// </summary>
public enum PasswordResetEnum
{
[TextAttribute("ÊÇ")]
Yes = 1,
[TextAttribute("·ñ")]
No = 0
}
#endregion
}

/// <summary>
/// ¹¹Ôìö¾ÙÀà
/// add by kenny
/// add date
/// </summary>
public class TextAttribute : Attribute
{
public string Text
{
get
{
return _Text;
}
set
{
_Text = value;
}
}
string _Text;
public TextAttribute(string text)
{
_Text = text;
}
}
 
»ñµÃÖµ Type enumType = typeof(SysEnums.UserType);//ö¾ÙÊôÐÔ
int enumConst = int.Parse(UserType.ToString());//ö¾Ù¶ÔÓ¦µÄÖµ
string textVal = "";
string strValue = string.Empty;
Type typeDescription = typeof(Ahnlab.ApplicationServices.TextAttribute);
FieldInfo fi


Ïà¹ØÎĵµ£º

c# XMLÐòÁл¯Óë·´ÐòÁл¯

Ô­ÏÈÒ»Ö±ÓÃBinaryFormatterÀ´ÐòÁл¯Í¦ºÃ£¬¿ÉÊÇ×î½ü·¢ÏÖÔÚWinCEÏÂÊÇûÓа취½øÐÐBinaryFormatter²Ù×÷£¬ºÜ²»Ë¬£¬Ö»ÄܸijÉÁËBinaryWriterºÍBinaryReaderÀ´¶Áд£¬Í»È»Ïëµ½Äܲ»ÄÜÓÃXMLÀ´ÐòÁл¯£¿ÓÚÊÇÔÚÍøÉϲéÁËЩ×ÊÁϱãдÁËЩʵ¼ùÐÔ´úÂ룬×öЩ¼Ç¼£¬±ÜÃâÒÔºóÍü¼Ç¡£
ÐòÁл¯¶ÔÏó
    public class People
  ......

c# Ö§³ÖXMLÐòÁл¯µÄ·ºÐÍ Dictionary

/// <summary>
/// Ö§³ÖXMLÐòÁл¯µÄ·ºÐÍ Dictionary
/// </summary>
/// <typeparam name="TKey"></typeparam>
/// <typeparam name="TValue"></typeparam>
[XmlRoot("SerializableDictionary")]
public class SerializableDictionary<TKey, TValue& ......

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# 3.0ÐÂÌØÐÔϵÁУºÒþº¬ÀàÐÍvar

Ò»£®ÉñÆæµÄvar
¡¡¡¡ÔÚC#3.0ÖÐÔö¼ÓÁËÒ»¸ö±äÁ¿ÉùÃ÷var£¬Õâ¸öÉùÃ÷ºÍJavaScript µÄ varÀàËÆ£¬µ«Ò²Óв»Í¬¡£
¡¡¡¡1. Ïàͬµã£¬Ëü¿ÉÒÔÓÃvarÀ´ÉùÃ÷ÈκÎÀàÐ͵ľֲ¿±äÁ¿¡£
¡¡¡¡2. ²»Í¬µã£¬Ëü½ö½ö¸ºÔð¸æËß±àÒëÆ÷£¬¸Ã±äÁ¿ÐèÒª¸ù¾Ý³õʼ»¯±í´ïʽÀ´ÍƶϱäÁ¿µÄÀàÐÍ£¬¶øÇÒÖ»ÄÜÊǾֲ¿±äÁ¿¡£
¡¡¡¡¶þ£®Ïàͬµã
¡¡¡¡Ëü¿ÉÒÔÉùÃ÷
var integer = ......

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

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