rt

解决方案 »

  1.   

    不难..有类c的基础...第一个小程序很快的.虽然很简陋...多google,多csdn,更多msdn...
    以前开始看的时候也是1晚上就有个小玩意.
      

  2.   

    个人感觉很好的语言,用.NET第一选择my blog
    http://ufo-crackerx.blog.163.com/
      

  3.   

    入门简单,学好不容易!
    相对于Java我感觉还是挺简单的!我现在感觉自己就是学了点皮毛!呵呵
      

  4.   

    相对java来说就容易多了,我也是刚开始不久,慢慢来吧,应该很快上手的。
      

  5.   

    要是要求仅仅是写个hello world的话很简单,可是越学发现越多东西,头晕了现在
      

  6.   

    个人觉得C#是现阶段面向对象编程语言里面最简单的一种,C#开发比较容易,而且入门比较快,有很好的开发工具可以使用,对于初学者来说可以省去很多麻烦。
    但C#也有一些需要注意的地方,首先,C#封装的太严,很多时候你只能用微软官方给的一些控件,很难了解一些东西的内部结构。其次,用C#做底层的开发比较难,用C#开发很难了解程序底层的运行方式。
      

  7.   

    .net技术入门门槛不算高,但是学精通需要下很多功夫
      

  8.   

    与JAVA相比,C#确实比较方便,但是和JAVA一样都是面向对象的编程的语言,如果能把JAVA学好,那么C#对你应该不会太难!
      

  9.   

    C#不是难,是它的抽象,它的包装太多,让你一头雾水,所以有的人说它难
    最好学点C/C++后再学C#就会很好地理解C#的包装与抽象
      

  10.   

    C#不难,很快就能够使用了,但是要能有随心所欲的使用,要学好.NET,这就不是朝夕可就得事情了
      

  11.   

    看你有什么基础了,如果有面向对象的基础的话,入门还是比较简单的,但是.net博大精深学好它还得花点时间
      

  12.   


    和C++很像,都姓c嘛,感觉比c++更容易上手~,据说C++是操作底层的,c#是通俗应用~
      

  13.   

    多做点东西,其实什么东西都有它好的一面,和坏的一面,C#的封装性强,如果不是在.net,平台,对开发的局限也没那么大.....
      

  14.   

    我也要刚入手,以前做C/C++,现在想做C# ,看了和C++很相近,呵呵,现在开始从工程入手
      

  15.   

    语法不难,c++,java都不难。难的是framework,比如mfc,jdk,.net framework。因为你要在这个框架下实现功能就要符合框架的编程思路。
      

  16.   

    using System;
    using System.Collections;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Drawing.Drawing2D;
    using System.Drawing.Imaging;
    using System.Web;
    using System.Web.SessionState;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.HtmlControls;using System.IO;namespace Shop
    {
        /// <summary>
        /// Summary description for ValidateCode.
        /// </summary>
        public class ValidateCode : System.Web.UI.Page
        {
            /// <summary>
            /// Validation Code generated fromt these charaters.
            /// Note: l,L 1(number), o, O, 0(number) are removed
            /// </summary>
            private const string strValidateCodeBound = "abcdefghijkmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ23456789";
            private static string[] Fonts = new string[] {  "Helvetica",
                                                     "Geneva", 
                                                     "sans-serif",
                                                     "Verdana",
                                                     "Times New Roman",
                                                     "Courier New",
                                                     "Arial"
                                                 };
            #region Web Form Designer generated code
            override protected void OnInit(EventArgs e)
            {
                //
                // CODEGEN: This call is required by the ASP.NET Web Form Designer.
                //
                InitializeComponent();
                base.OnInit(e);
            }
            
            /// <summary>
            /// Required method for Designer support - do not modify
            /// the contents of this method with the code editor.
            /// </summary>
            private void InitializeComponent()
            {    
                this.Load += new System.EventHandler(this.Page_Load);        }
            #endregion        /// <summary>
            /// event handler of page load
            /// </summary>
            private void Page_Load(object sender, System.EventArgs e)
            {
                if(!IsPostBack)
                {
                    string str_ValidateCode = GetRandomString(6);                Session["ValidateCode"] = str_ValidateCode;
                    CreateImage(str_ValidateCode);
                }        }        /// <summary>
            /// Generate random string
            /// </summary>
            private string GetRandomString(int int_NumberLength)
            {
                string valString = string.Empty;
                Random theRandomNumber = new Random((int)DateTime.Now.Ticks);            for (int int_index = 0; int_index < int_NumberLength; int_index++)
                    valString += strValidateCodeBound[theRandomNumber.Next(strValidateCodeBound.Length - 1)].ToString();            return valString;
            }        /// <summary>
            /// Generate random Color
            /// </summary>
            private Color GetRandomColor()
            {
                Random RandomNum_First = new Random((int)DateTime.Now.Ticks);
            
                System.Threading.Thread.Sleep(RandomNum_First.Next(50));
                Random RandomNum_Sencond = new Random((int)DateTime.Now.Ticks);               
                int int_Red = RandomNum_First.Next(256);
                int int_Green = RandomNum_Sencond.Next(256);
                int int_Blue = (int_Red + int_Green > 400) ? 0 : 400 - int_Red - int_Green;
                int_Blue = (int_Blue > 255) ? 255 : int_Blue;            return Color.FromArgb(int_Red, int_Green, int_Blue);
            }
            
            /// <summary>
            /// Create Validation Code Image
            /// </summary>
            private void CreateImage(string str_ValidateCode)
            {
                int int_ImageWidth = str_ValidateCode.Length * 22;
                Random newRandom = new Random();            Bitmap theBitmap = new Bitmap(int_ImageWidth + 6 , 38);
                Graphics theGraphics = Graphics.FromImage(theBitmap);            theGraphics.Clear(Color.White);            drawLine(theGraphics, theBitmap, newRandom);
                theGraphics.DrawRectangle(new Pen(Color.LightGray, 1), 0, 0, theBitmap.Width - 1, theBitmap.Height -1 );            for (int int_index = 0; int_index < str_ValidateCode.Length; int_index++)
                {            
                    Matrix X = new Matrix();
                    X.Shear((float)newRandom.Next(0,300)/1000 - 0.25f, (float)newRandom.Next(0,100)/1000 - 0.05f);
                    theGraphics.Transform = X;
                    string str_char = str_ValidateCode.Substring(int_index, 1);
                    System.Drawing.Drawing2D.LinearGradientBrush newBrush = new System.Drawing.Drawing2D.LinearGradientBrush(new Rectangle(0, 0, theBitmap.Width, theBitmap.Height), Color.Blue, Color.DarkRed, 1.2f, true); 
                    Point thePos = new Point(int_index * 21 + 1 + newRandom.Next(3), 1 + newRandom.Next(13));                Font theFont = new Font(Fonts[newRandom.Next(Fonts.Length -1)], newRandom.Next(14,18), FontStyle.Bold);                theGraphics.DrawString(str_char, theFont, newBrush, thePos);
                }            drawPoint(theBitmap, newRandom);            MemoryStream ms = new MemoryStream();
                theBitmap.Save(ms, ImageFormat.Png);            Response.ClearContent(); 
                Response.ContentType = "image/Png";
                Response.BinaryWrite(ms.ToArray());
                theGraphics.Dispose();
                theBitmap.Dispose();
                Response.End();
            }        /// <summary>
            /// Draw Line for noise
            /// </summary>
            private void drawLine(Graphics gfc,Bitmap img, Random ran)
            {
                for (int i = 0; i < 10; i++)
                {
                    int x1 = ran.Next(img.Width);
                    int y1 = ran.Next(img.Height);
                    int x2 = ran.Next(img.Width);
                    int y2 = ran.Next(img.Height);
                    gfc.DrawLine(new Pen(Color.Silver), x1, y1, x2, y2);
                }
            }        /// <summary>
            /// Draw Point for noise
            /// </summary>
            private void drawPoint(Bitmap img, Random ran)
            {
                for (int i = 0; i < 30; i++)
                {
                    int x = ran.Next(img.Width);
                    int y = ran.Next(img.Height);
                    img.SetPixel(x,y,Color.FromArgb(ran.Next()));
                }        }    }
    }
      

  17.   

    在学WINFORM时,没人指导很多东西都不知道,很麻烦的
      

  18.   

    先学java 在学C# ......就有感觉啦.........感觉C#是那么的简单...