CTI  什么意思    第一个问题 我改为DOUBLE 也错!
   DECIMAL 类型不的比INT 还高吗?  题外话:
   怎么企业要C#的程序员这么少!!!!!!  都去要什么JAVA C++ !~

解决方案 »

  1.   

    第3题:using System.Windows.Forms;
    public class frmHelloApp : Form
    {
    public static void Main(string[] args)
    {
    //frmHelloApp frmhello=new frmHelloApp();
    Application.Run(new frmHelloApp());
    }
    public frmHelloApp()
    {
    }

    }
      

  2.   

    to_hackbutter(火枪手) 难道书有错
      ?
    我看后面的 都是这样的?  咋办?
      

  3.   

    using System.Windows.Forms;
    public class frmHelloApp : Form
    {
    public static void Main(string[] args)
    {
    frmHelloApp frmhello=new frmHelloApp();

    Application.Run(frmhello);
    }


    }
    这样也行!
      

  4.   

    to:hackbutter(火枪手) 
      你用什么编译的?
      

  5.   

    问题一:改为decimal w=3.145m;
    问题二:改为public static void Main(string[] args)
    问题三: frmHelloApp frmhello=new frmHelloApp();
    Application.Run(frmhello);
     shuicanyi (水残一),对么?
      

  6.   

    第2题 
    using System;
    using System.IO;class list
    {
    public static void Main()
    {
    string[] args= new string[]{"file.txt"};  // 这句是我加的,因为原题内未定义 try
    {
      int ctr=0;
    if (args.Length<=0)
    {
    Console.WriteLine("format: list filename");
    return;
    }
    else
    {
    System.IO.FileStream f = new FileStream(args[0],FileMode.Open);   //前面强制指定引用
    try
    {
    StreamReader t=new StreamReader(f);
    string line;
    while ((line=t.ReadLine())!=null)
    {
    ctr++;
    Console.WriteLine("{0}:{1}",ctr,line);
    }
    f.Close();
    }
    finally
    {
    f.Close();
    }
    }
    }
    catch (System.IO.FileNotFoundException)
    {
    Console.WriteLine("list could not find the file {0}",args[0]);
    }
    catch (Exception e)
    {
    Console.WriteLine("exception:{0}\n\n",e);
    }
    }
    }
      

  7.   

    我想csc很小,方便,但如果条件运行最好还是用.net studio吧,功能强大,并且提供很多很细的帮助
      

  8.   

    TO—hackbutter(火枪手)  我VS 都装好了  就是不知道 怎么才可以运行 这中小程序,、
     只知道 用CSC       本帖子 我加 40分   没有部分 ,我分很少了
      

  9.   

    to_ leonXXX(飞) 
       我没有看懂后面的意思?
      

  10.   

    第一个问题:
    decimal w=3.145M;
             注意后面的M
    第二个问题:
             你的问题是没有用namespace,你象我这样写就可以了
    using System;
    using System.IO;class list
    {
    public static void Main(string[] args)
    {
    try
    {

    int ctr=0;
    if (args.Length<=0)
    {
    Console.WriteLine("format: list filename");
    return;
    }
    else
    {
    System.IO.FileStream f = new FileStream(args[0],FileMode.Open);
    try
    {
    StreamReader t=new StreamReader(f);
    string line;
    while ((line=t.ReadLine())!=null)
    {
    ctr++;
    Console.WriteLine("{0}:{1}",ctr,line);
    }
    f.Close();
    }
    finally
    {
    f.Close();
    }
    }
    }
    catch (System.IO.FileNotFoundException)
    {
    Console.WriteLine("list could not find the file {0}",args[0]);
    }
    catch (Exception e)
    {
    Console.WriteLine("exception:{0}\n\n",e);
    }
    }
    }
    第三个问题:
    Application.Run(new frmCsTest());
             就可以了
      

  11.   

    TO_leonXXX(飞)
    你说的第三题
       和我一样
    ??
      

  12.   

    sangengyi(三更呓)
    这人挺坏的.
      

  13.   

    TO_ omafox()      说一个理由!
      

  14.   

    frmHello和frmhello怎么会一样,你笔误了吧?
      

  15.   

    对不起,没看清楚。
    double类型的值不能隐含转换为decimal类型。
    应该为:
    decimal w = 3.145m;
    或为:
    decimal w = ( decimal )3.145;
      

  16.   

    TO— leonXXX(飞)
       谢谢  55555555555555555555555555
      

  17.   

    1.decimal w=3.145M;后面加m也行
    2.Main()方法应该加参数(string[] args)吧
    3.按你的写法,应该是
    frmHelloApp frmhello=new frmHelloApp();
    Application.Run(frmHello);
    中frmhello实例大小写问题或
     
    同 epimetheus(阿戈尔) 说的:
    用Application.Run(new frmHelloApp);即可
      

  18.   

    1.如果希望实数被视为 decimal 类型,请使用后缀 m 或 M,例如:
    decimal myMoney = 300.5m;如果没有后缀 m,该数字将被视为 double,从而导致编译器错误。
    2.static void Main(string[] args)3
    Application.Run(frmhello);//h是小写,大写是类名了
      

  19.   

    用VS。NET吧。
    新建一个ConsoleApplication就行了。一样好用的。