System.Convert.ToDouble("##0.0")

解决方案 »

  1.   

    System.Convert.ToDateTime("yyyy年MM月dd日")
      

  2.   

    是这样吗
    double do=Convert(120.1,"##0.0");
      

  3.   

    double do=Convert.ToDouble("120.1","##0.0");
      

  4.   

    http://chs.gotdotnet.com/quickstart/howto/
    看“基本数据类型”\格式化基类型 一节!!
      

  5.   

    难道C#中的所有都必须转成string 再能格式成各种种样的格式吗
      

  6.   

    那么用相应类型的ToString(格式)进行输出。
      

  7.   

    DateTime    mydo;
               mydo=DateTime.Now ;
    textBox1.Text =  mydo.ToString("yyyy年MM月dd日", null);
      

  8.   

    DateTime Formatting 
    Format Character | Format Pattern | Associated Property/Description
     
    d MM/dd/yyyy                ShortDatePattern 
     
    D dddd, MMMM dd, yyyy       LongDatePattern 
     
    f dddd, MMMM dd, yyyy HH:mm Full date and time (long date and short time)
     
    F dddd, MMMM dd, yyyy HH:mm:ss FullDateTimePattern (long date and long time)
     
    g MM/dd/yyyy HH:mm          General (short date and short time)
     
    G MM/dd/yyyy HH:mm:ss       General (short date and long time)
     
    m, M MMMM dd                MonthDayPattern 
     
    r, R ddd, dd MMM yyyy HH’:’mm’:’ss ‘GMT’ RFC1123Pattern 
     
    S yyyy-MM-dd HH:mm:ss SortableDateTimePattern (conforms to ISO 8601) using local time
     
    t HH:mm                     ShortTimePattern 
     
    T HH:mm:ss                  LongTimePattern 
     
    u yyyy-MM-dd HH:mm:ss       UniversalSortable­DateTimePattern (conforms to ISO 8601) using universal time
     
    U dddd, MMMM dd, yyyy HH:mm:ss UniversalSortable­DateTimePattern 
     
    y, Y MMMM, yyyy                YearMonthPattern