码迷,mamicode.com
首页 >  
搜索关键字:tostring    ( 5990个结果
遍历分区大小
Get-WmiObject -Class Win32_LogicalDisk -Filter "DriveType=3" | Format-Table deviceid, @{Label="free(GB)"; Expression={($_.freespace/1GB).tostring("f1....
分类:其他好文   时间:2014-08-08 12:07:55    阅读次数:238
c# datetime 格式化
//c datetime 格式化DateTime dt = DateTime.Now;Label1.Text = dt.ToString();//2005-11-5 13:21:25Label2.Text = dt.ToFileTime().ToString();//1277564168599128...
分类:其他好文   时间:2014-08-07 22:03:06    阅读次数:221
多种下载文件方式 Response.BinaryWrite(byte[] DocContent);Response.WriteFile(System.IO.FileInfo DownloadFile .FullName);Response.Write(string html2Excel);
通过html给xls赋值,并下载xls文件一、this.Response.Write(sw.ToString());System.IO.StringWriter sw = new System.IO.StringWriter(); this.Response.Clear(); string strF...
分类:Web程序   时间:2014-08-07 17:58:30    阅读次数:385
C#.NET Split 的几种使用方法
第一种方法:1 string s = "abcdeabcdeabcde";2 string[] sArray = s.Split('c');3 foreach (string i in sArray)4 Console.WriteLine(i.ToString());5 Console.ReadKe...
分类:Web程序   时间:2014-08-06 18:56:21    阅读次数:273
Map.Entry
实例如下:public String getReportURL() throws Exception { String reportURL = parameterMap.get("showPageUrl").toString() + "showPageNum=1"; Iterator it = pa...
分类:其他好文   时间:2014-08-06 17:37:11    阅读次数:180
C#基础-获得当前程序的 空间名.类名.方法名
string typeName = this.GetType().ToString();//空间名.类名string typeName = this.GetType().Name;//类名new System.Diagnostics.StackTrace().GetFrame(0).GetMetho...
分类:其他好文   时间:2014-08-06 14:40:41    阅读次数:198
ASP.NET连接各种数据库办法
连接Access数据库: string con_access=ConfigurationManager.AppSettings["accessCon"].ToString();连接SQLServer string con_sqlserver=ConfigurationManager.Ap...
分类:数据库   时间:2014-08-05 19:01:49    阅读次数:198
js 日期修改
很早之前在CSDN上发的博客,现在CSDN上得少了,就把这个转到园子里来//重写toString方法,将时间转换为Y-m-d H:i:s格式Date.prototype.toString = function(){ return this.getFullYear() + "-" + (this.ge...
分类:Web程序   时间:2014-08-05 18:38:09    阅读次数:236
javascript私有方法揭示为公有方法
揭示模式可用于将私有方法暴露为公共方法。当为了对象的运转而将所有功能放置在一个对象中以及想尽可能地保护该对象,这种揭示模式就非常有用。板栗: var myarray; (function(){ var astr = "[object Array]", toString = Object...
分类:编程语言   时间:2014-08-05 15:42:59    阅读次数:231
由Nullable模式想到的ToString的扩展
虽然关于null的一切争论永不停息,但根据实际开发经历,很多时候需要判断无聊的null,并且有些的判断是可有可无的,尤其是在表现层。 string e = null; if (e != null) { Console.WriteLine(e.ToString()); }上述代码如果能换成这样...
分类:其他好文   时间:2014-08-05 15:26:49    阅读次数:203
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!