随笔分类 - .NET2.0&3.5
摘要:static void Main(string[] args) { //int d = GetInt("4.5"); int d = (int)Math.Round(2.5,MidpointRounding.AwayFromZero); decimal kk = Convert.ToDecimal("3.2"); //int dd = int.Parse(d); int result; int.T...
阅读全文
摘要:Localization To localize, or to be more specific, to create a web application that can be multi-lingual was a complex task prior to ASP.NET v2.0. If you used resource files (RESX) and the ResourceMana...
阅读全文
摘要:1.Windows Application 本地化 1.1 使用VS生成资源文件 首先,设置form类的localizable属性为true。 在winform上创建所需的控件及布局。 在form类的language属性中选择需要的本地化语言。 Thread.CurrentThread.CurrentCul...
阅读全文
摘要:Indicates that the value of a static field is unique for each thread. [ThreadStatic] private static Singlton myInstanace; public static Singlton Instance { get { ...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using Sys...
阅读全文
摘要:连接池性能测试代码如下: 1.连接池设置为True 耗时:00:00:00.4972304 2.连接池设置为False 耗时:00:00:43.6183675 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 using System.Diagno...
阅读全文
摘要:SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(); builder.DataSource = "127.0.0.1"; builder.InitialCatalog = "database"; builder.UserID = "user"; builder.Password = "user"; buil...
阅读全文
摘要:Web.config: C# code: string connString = System.Configuration.ConfigurationManager.AppSettings["ConnString"]; ConnectionStringBuilder: SqlConnectionStringBuilder builder = new SqlConne...
阅读全文
摘要:SqlConnection con = new SqlConnection(connectionstring);
阅读全文
摘要:DataSet ds = new DataSet(); ds.EnforceConstraints = true; ds.GetChanges(); ds.AcceptChanges(); if(ds.HasErrors ) ds.ReadXml();
阅读全文
摘要:/// ///Represents a strongly typed in-memory cache of data. /// [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] [global::System.Ser...
阅读全文
摘要:The Native Image Generator (Ngen.exe) is a tool that improves the performance of managed applications. Ngen.exe creates native images, which are files containing compiled processor-specific machine co...
阅读全文
摘要:Optimistic currency failed, http://msdn.microsoft.com/en-us/library/aa0416cz.aspx
阅读全文
摘要:http://msdn.microsoft.com/en-us/library/27y4ybxw.aspx
阅读全文
摘要:PE section Contents of PE section PE header ...
阅读全文
摘要:Each metadata table holds information about the elements of your program. For example, one metadata table describes the classes in your code, another table describes the fields, and so on. Each row o...
阅读全文
摘要:1:a=10,b=15,在不用第三方变题的前提下,把a,b的值互换 a=a+b; b=a-b; a=a-b; 2:已知数组int[] max={6,5,2,9,7,4,0};用快速排序算法按降序对其进行排列,并返回数组 3:请简述面向对象的多态的特性及意义! 4:session喜欢丢值且占内存,Cookis不安全,请...
阅读全文
摘要:A strong name consists of the assembly's identity—its simple text name, version number, and culture information (if provided)—plus a public key and a digital signature. It is generated from an assemb...
阅读全文
摘要:In .Net framework Assembly is the minimum unit of deployment. You cannot deploy anything less than an assembly. To CLR, a type does not exist outside of the context of an assembly. Assembly can con...
阅读全文
摘要:Welcome to the Microsoft .NET Framework version 3.5. The .NET Framework is an integral Windows component that supports building and running the next generation of applications and Web services. The k...
阅读全文

浙公网安备 33010602011771号