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

c# ½«Ã¶¾Ù×÷Ϊ¼üÖµµÄÐÎʽ´æ´¢

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
namespace ½«Ã¶¾Ù×÷Ϊ¼üÖµµÄÐÎʽ´æ´¢
{
    enum Myenum
    {
       First=3,
       Second,
       Third
    }
    class Program
    {
        static void Main(string[] args)
        {
            //ÓÃhashtable¿ÉÒÔʵÏÖÂð? NameValueCollection¿ÉÒÔʵÏÖÂð£¿
            Dictionary<string, int> dictionary = new Dictionary<string, int>();
            string [] enumArray=Enum.GetNames(typeof(Myenum));
            for (int i = 0; i < enumArray.Length; i++)
            {
                dictionary.Add(enumArray[i],(int) Enum.Parse(typeof(Myenum), enumArray[i]));
            }
            Console.WriteLine(dictionary["First"]);
            Console.WriteLine(dictionary["Second"]);
            Console.WriteLine(dictionary["Third"]);
            Console.Read();
         
        }
    }
}


Ïà¹ØÎĵµ£º

JAVAÓëC#±È½Ï

C#ÓëJAVAµÄÏà֮ͬ´¦:ÓÉÓÚC#ÓëJAVA¶¼ÊÇ»ùÓÚC++·¢Õ¹ÆðÀ´µÄ,Òò´Ë¶þÕßÖ®¼ä¾ßÓкܶàÏàËÆÖ®´¦,¾ßÌåÈçÏÂ:
¡¡¡¡1¡¢C#ºÍJAVAÓïÑԵıàÒë½á¹ûÊǶÀÁ¢ÓÚ¼ÆËã»úºÍ±à³ÌÓïÑԵģ¬¿ÉÖ´ÐÐÎļþ¿ÉÒÔÔÚÊܹÜÀíµÄÖ´ÐÐ
¡¡¡¡»·¾³ÖÐÖ´ÐУ»
¡¡¡¡2¡¢C#ºÍJAVAÓïÑÔ¶¼ÊDzÉÓÃÁË×Ô¶¯µÄÀ¬»ø»ØÊÕ»úÖÆ£»
¡¡¡¡3¡¢C#ºÍJAVAÓïÑÔ¶¼È¡ÏûÁËÖ¸Õë²Ù×÷£»
¡¡¡¡4¡¢ ......

£¨C#£©Asp.netÈÕÆÚ¡¢Ê±¼äº¯Êý´óÈ«

ÔÚASP.NetÒ»°ãµÄ³ÌÐò±àдÖУ¬ËùʹÓõÄÊý¾ÝÀïÃæ£¬ÈÕÆÚʱ¼äÊÇÒ»ÖÖÌØÊâµÄÊý¾ÝÀàÐÍ£¬Ò²ÊǾ­³£±»Ê¹Óõġ£---µçÄԽ̳̼¼ÊõÑ§Ï°Íø
  ÔÚVisual Basic.NETÖеÄÈÕÆÚʱ¼äÊý¾ÝÓÃÊýÖµµÄÊý¾ÝÀàÐͱ£´æ£¬¶øÇÒÓз¶Î§¡£
   ÈÕÆÚµÄ·¶Î§Êǹ«Ôª1Äê1ÔÂ1ÈÕ¡«¹«Ôª9999Äê1 2ÔÂ3 1ÈÕ£¬Ê±¼äµÄ·¶Î§ÊÇ00£º00£º00¡«23£º59£º59¡£ÉùÃ÷¸ñÊ½È ......

Asp.net(C#)ʵÏÖÑéÖ¤Â빦ÄÜ

н¨Ò»¸öרÃÅÓÃÀ´´´½¨ÑéÖ¤ÂëͼƬµÄÒ³ÃæValidateCode.aspx
ËüµÄºǫ́csÎļþ´úÂëÈçÏ£º
PageLoad
private void Page_Load(object sender, System.EventArgs e)
{
string checkCode = CreateRandomCode(4);
Session["CheckCode"] = checkCode;
CreateImage(checkCode);
......

C#±È½ÏͼƬÊÇ·ñÒ»ÖÂ


/// <summary>
/// ±È½ÏÁ½·ùͼƬÊÇ·ñÒ»Ö£¨Ê¹ÓÃMarshal.ReadByte·½Ê½£©
/// </summary>
/// <param name="bitmap1">ͼƬ1</param>
/// <param name="bitmap2">ͼƬ2</param>
/// <returns>Èç¹ûÁ½·ùͼƬÏàͬ£¬·µ»Ø0£»Èç¹ûͼƬ1СÓÚͼƬ2£¬·µ»ØÐ¡ÓÚ0µÄÖµ£»Èç¹ûͼƬ1´óÓÚÍ¼Æ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ