
.NET技术
文章平均质量分 72
leecong
ASP.NET,J2EE,Oracle,JavaScript
展开
-
C#中格式化数字输出,使用NumberFormatInfo.NumberGroupSeparator 属性
C#using System;using System.Globalization;class NumberFormatInfoSample { public static void Main() { // Gets a NumberFormatInfo associated with the en-US culture. NumberF原创 2007-10-20 10:53:00 · 6142 阅读 · 3 评论 -
C#中使用 ref 和 out 传递数组
C#class TestOut{ static void FillArray(out int[] arr) { // Initialize the array: arr = new int[5] { 1, 2, 3, 4, 5 }; } static void Main() { in原创 2007-10-20 10:56:00 · 919 阅读 · 0 评论 -
.NET中的处理 Transact-SQL 事务(C#)SqlTransaction 类
private static void ExecuteSqlTransaction(string connectionString){ using (SqlConnection connection = new SqlConnection(connectionString)) { connection.Open(); SqlComma原创 2007-11-23 11:20:00 · 2752 阅读 · 0 评论 -
VS.NET2005中的GridView的操作
//?? protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e) { this.GridView1.EditIndex = e.NewEditIndex; dataBind(); } //取消 protected void GridView1_R原创 2007-12-04 10:14:00 · 621 阅读 · 0 评论 -
将尖括号、空格、回车、换行等特殊字符转换成普通文本
public class ToEncode...{ public ToEncode() ...{ // // TODO: 在此处添加构造函数逻辑 // } public string HTMLEncode(string str) ...{ str = str.Replace(">", ">");原创 2007-12-18 09:03:00 · 1859 阅读 · 1 评论