· 怎么样?
答案是这样的s1 is A string
s2 is A string
s1 is now Anothing string
s2 is now string看到这个结果大家感觉怎么样!我是很感到意外的。因为根据原来的C实现字符串的方式,在这里面作为一个指针来说,s1与s2应该指向相同的地址。另外对于字符串处理还有另一个问题,如下例:
要构建如 ...
· 个人珍藏,仅为存档.今天整理磁盘,没处放.扔BLOG.看不懂,别问我.自己研究.webserver.csnamespace cnnbsun.webserver
{
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading ;class MyWebServer
{private TcpListener myListe...
· 前一段时间在论坛上看见有人问如何使用.net进行POP3编程,其实POP3的使用很简单,所以.net没有向SMTP那样给出相应的类来控制.废话少说,程序员最需要的使代码,:)!1.打开VS.NET 2003.2.新建一个WinForm Application.3.添加命名空间using System;
using System.Drawing;
using System.Collections;
usin...
· using System;
using System.Runtime.InteropServices;namespace ArLi.CommonPrj {#region how use this?/*string sVol = getvol.GetVolOf("C");*/#endregionpublic class getvol{[DllImport("kernel32.dll")]private static extern int GetVolumeInformation(string lpRootP...
· I must build up my own code criterion for C# development. 1. Description
///
///description of the module or function
///
2. Name
TreeView: trw_
ListView:lsv_
TextBox:txt_
Button:btn_
ListBox:lst_
ComboBox:cmb_
Label:lbl_
CheckBox:ckb_
PictureBox:ptb_
MenuItem:mnt...
· SQL Server ODBC Standard Security:"Driver={SQL Server};Server=Aron1;Database=pubs;Uid=sa;Pwd=asdasd;" Trusted connection:"Driver={SQL Server};Server=Aron1;Database=pubs;Trusted_Connection=yes;" Prompt for username and password:oConn.Properties("Prompt...
· 按行读写文件
判断文件是否存在:File.Exists(string filePath)
判断目录是否存在:Directory.Exists("D:\\LastestVersion")按行读取文件:int fileCount=0;// Open the file just specified such that no one else can use it.StreamReader sr = new StreamReader(textBox1.Text.Trim());...