学了C#已经快1个月了,想做点实际的东西,请各位告诉我一些题目以及主要实现的功能.
不管谁只要说了一个题目以及一些详细的东西的,都给10分以上的分.谢谢!!!!!!!

解决方案 »

  1.   

    Winform的话可以做做俄罗斯方块什么的游戏,也可以做做 图书馆管理系统 什么的...Webform的话可以从新闻发布系统开始,有后台管理包括新闻添加修改删除,最好能无限分类
      

  2.   

    作个同学录吧,很有意思的,仿照chinaren那样子。
      

  3.   

    如果说计算器,这个应该不错吧,先乘除后加减这些都是意思啦。
    http://www.cnblogs.com/skyiv/archive/2007/08/21/Calc.html
      

  4.   


    一个表达式计算器,用C#写的,利用了VB编译器的强劲性能,可以计算任何合法的VB表达式,可以有一个自变量(x),也可以不要自变量。
      

  5.   

    // Calc.cs - 表达式计算器
    // 编译方法: csc /t:winexe Calc.cs VBExpression.csusing System;
    using System.Windows.Forms;
    using Skyiv.Util;namespace Skyiv
    {
      class Calc : Form
      {
        TextBox tbxA1, tbxA2, tbxA3;    Calc()
        {
          Text              = "表达式计算器";
          StartPosition     = FormStartPosition.CenterScreen;
          Width             = 400;
          Height            = 200;      Label lblA1       = new Label();
          lblA1.Text        = "表达式(&E)";
          lblA1.Parent      = this;
          lblA1.Top         = 23;
          lblA1.Left        = 10;
          lblA1.AutoSize    = true;      tbxA1             = new TextBox();
          tbxA1.Parent      = this;
          tbxA1.Top         = 20;
          tbxA1.Left        = 80;
          tbxA1.Width       = 300;
          tbxA1.BorderStyle = BorderStyle.FixedSingle;      Label lblA2       = new Label();
          lblA2.Text        = "自变量(&X)";
          lblA2.Parent      = this;
          lblA2.Top         = 48;
          lblA2.Left        = 10;
          lblA2.AutoSize    = true;      tbxA2             = new TextBox();
          tbxA2.Parent      = this;
          tbxA2.Top         = 45;
          tbxA2.Left        = 80;
          tbxA2.Width       = 300;
          tbxA2.BorderStyle = BorderStyle.FixedSingle;      Button btnA3      = new Button();
          btnA3.Text        = "计算(&C)";
          btnA3.Parent      = this;
          btnA3.Top         = 70;
          btnA3.Left        = 10;
          btnA3.Width       = 62;
          btnA3.Click      += new EventHandler(Calc_Clicked);      tbxA3             = new TextBox();
          tbxA3.Parent      = this;
          tbxA3.Top         = 70;
          tbxA3.Left        = 80;
          tbxA3.Width       = 300;
          tbxA3.BorderStyle = BorderStyle.FixedSingle;
          tbxA3.ReadOnly    = true;
          TextBox tbxA4     = new TextBox();
          tbxA4.Text        = @"
    表达式使用 Visual Baisc 语法,可带一个的自变量(x)
    可使用 pi、e 等常量,sin、cos、tan、log、sqrt 等函数
    例子:x * cos(x * pi / sqrt(25 * 6^4)) + log(E^10)";
          tbxA4.Parent      = this;
          tbxA4.Top         = 95;
          tbxA4.Left        = 10;
          tbxA4.Width       = 370;
          tbxA4.Height      = 65;
          tbxA4.BorderStyle = BorderStyle.None;
          tbxA4.Multiline   = true;
          tbxA4.ReadOnly    = true;
        }    void Calc_Clicked(object sender, EventArgs ea)
        {
          (sender as Control).Enabled = false;
          try
          {
            double x = 0;
            if (tbxA2.Text.Trim().Length != 0)
            {
              try
              {
                x = double.Parse(tbxA2.Text);
              }
              catch
              {
                try
                {
                  x = (new Expression(tbxA2.Text)).Compute(0);
                }
                catch (Exception ex)
                {
                  MessageBox.Show(ex.Message, "自变量出错");
                }
              }
            }
            tbxA3.Text = (new Expression(tbxA1.Text)).Compute(x).ToString();
          }
          catch (Exception ex)
          {
            MessageBox.Show(ex.Message, "表达式出错");
          }
          finally
          {
            (sender as Control).Enabled = true;
          }
        }    [STAThread]
        static void Main(string [] args)
        {
          Application.Run(new Calc());
        }
      }
    }
      

  6.   

    计算表达式的代码用的是“银河”的代码(VB版):
    http://www.cnblogs.com/skyivben/archive/2005/10/31/265861.html// VBExpression.cs - 动态生成数学表达式并计算其值
    // 表达式使用 Visual Baisc 语法,可带一个的自变量(x)
    // 可使用 pi、e 等常量,sin、cos、tan、log、sqrt 等函数
    // 例子:e + sqrt(log(pi ^ e) * x) + sin(x * pi / 180)using System;
    using System.CodeDom.Compiler;
    using Microsoft.VisualBasic;
    using System.Reflection;
    using System.Text;
    using System.Globalization;namespace Skyiv.Util
    {
      sealed class Expression
      {
        object instance;
        MethodInfo method;    public Expression(string expression)
        {
          if (expression.ToUpper(CultureInfo.InvariantCulture).IndexOf("RETURN") < 0) expression = "Return " + expression;
          string className = "Expression";
          string methodName = "Compute";
          CompilerParameters p = new CompilerParameters();
          p.GenerateInMemory = true;
          CompilerResults cr = new VBCodeProvider().CompileAssemblyFromSource
          (
            p,
            string.Format
            (
              @"Option Explicit Off
              Option Strict Off
              Imports System, System.Math, Microsoft.VisualBasic
              NotInheritable Class {0}
              Public Function {1}(x As Double) As Double
              {2}
              End Function
              End Class",
              className, methodName, expression
            )
          );
          if(cr.Errors.Count > 0)
          {
            string msg = "Expression(\"" + expression + "\"): \n";
            foreach (CompilerError err in cr.Errors) msg += err.ToString() + "\n";
            throw new Exception(msg);
          }
          instance = cr.CompiledAssembly.CreateInstance(className);
          method = instance.GetType().GetMethod(methodName);
        }    public double Compute(double x)
        {
          return (double)method.Invoke(instance, new object [] { x });
        }
      }
    }