zoukankan      html  css  js  c++  java
  • 以时间命名的函数。

     /// <summary>
      /// 获得时间建立的语音文件名的时间部分
      /// </summary>
      /// <returns></returns>
      public string GetFileName(){
       string NowDateFileName="";
       DateTime dt=DateTime.Now;
       NowDateFileName=dt.Year.ToString();
       if(dt.Month.ToString().Length==1)
       {
        NowDateFileName+="0";
       }
       NowDateFileName+=dt.Month.ToString();
       if(dt.Day.ToString().Length==1)
       {
        NowDateFileName+="0";
       }
       NowDateFileName+=dt.Day.ToString();
       if(dt.Hour.ToString().Length==1)
       {
        NowDateFileName+="0";
       }
       NowDateFileName+=dt.Hour.ToString();
       if(dt.Minute.ToString().Length==1)
       {
        NowDateFileName+="0";
       }
       NowDateFileName+=dt.Minute.ToString();
       if(dt.Second.ToString().Length==1)
       {
        NowDateFileName+="0";
       }
       NowDateFileName+=dt.Second.ToString();
       return NowDateFileName;
      }
  • 相关阅读:
    小X的密码破译
    小X的加法难题
    足球联赛
    机器分配
    化装晚会
    Soundex编码
    迷之阶梯
    使用JMeter做压力测试
    SCOI 2010 序列操作
    动态求区间K大值(权值线段树)
  • 原文地址:https://www.cnblogs.com/JimZhang/p/226606.html
Copyright © 2011-2022 走看看