C# ²ËÄñ¼ÌÐøÌáÎÊ£¡ - .NET¼¼Êõ / C#
×ö¸öС¶«Î÷£¬ÔËÐйý³ÌÖлáµÃµ½Ò»¸öintÊý¾Ý£¬ÎÒÏë°ÑÕâ¸öÊý¾ÝÁí´æÎªÎÊÌ⣬Ï´θóÌÐòÔÙÔËÐÐʱ¿ÉÒÔʹÓã¡XML,TXTµÈ¶¼ÐУ¡ÔõôÉú³É£¬Éú³ÉÁËÔõô¸üУ¬Ôõô¶ÁÈ¡£¡Ïà¶Ô·¾¶£¡
Äã·Åµ½±¾µØµÄÒ»¸ötxtÎļþÀ³ÌÐò¹Ø±Õʱ°Ñ¸ÃÎļþ´ò¿ª£¬¸üУ¬³ÌÐò¿ªÆôʽ´ò¿ª¶ÁÈ¡
Èç¹û¾ÍÖ»ÓиöÊý¾ÝµÄ»°£¬ÄǾʹæ¸ötxt°É¡£
web:
д£º
using (StreamWriter sw = File.CreateText(Server.MapPath(Ïà¶Ô·¾¶)))
{
sw.WriteLine("Hello");
sw.WriteLine("And");
sw.WriteLine("Welcome");
}
¶Á£º
using (StreamReader sr = File.OpenText(Server.MapPath(Ïà¶Ô·¾¶)))
{
string s = "";
while ((s = sr.ReadLine()) != null)
{
Console.WriteLine(s);
}
}
up
¹Ø±Õʱ¸üÐÂ
C# code:
// it will be done when the form close.
private void Form1_FormClosed(object sender, FormClosedEventArgs e)
{
FileStream file = File.Open(@"C:\dataBegin.txt", FileMode.Open);
StreamWriter sWriter = new StreamWriter(file);
//change the record in the file.
sWr
Ïà¹ØÎÊ´ð£º
±àÒëÆ÷£ºC-Free4
mysql µ¥¶À°²×°µÄ£¬ÏÖÔÚΪapache+php+mysql¿ÉÒÔʹÓá£
×î½üÔÚÁ·Ï°c£¬c++£»ÏëÓÃc£¬c++Á¬½ÓÏÂÎÒµÄmysql£¬ºÃ¶àµØ·½¶à˵mysql.hÕÒ²»µ½¡£¶øÇÒÎÒmysqlûÓÐËùνµÄincludeÎļþ¼Ð°¡¡£
Íü¸ßÊÖÖ¸µãÒ»¶ ......
дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
struct hostent *hp;
char AlarmDevIP[20];
int x2;
hp = gethostbyname("www.google.com");
if (hp)
{
......
SHIFT¼ÓF10ÓëÄǸö¼üÓÒctrl±ßÉϵÄÄǸö¼ü¹¦ÄÜÒ»Ñù£¬ÏëÆÁÕâ¸ö
µ«²»ÖªÒªÔõôдÄǸö×éºÏ¼ü£¡
ÓÐûÄĸö´óÏÀ·ÅÒ»¶ÎÕâ¸öµÄ´úÂë»òдһ¶Î
http://topic.csdn.net/u/20090609/15/7dc9fb70-243f-4070-9cfd-34e48b66e6c6.html
......
ÎÒÃÇC#×öÒ»¸ö´°Ìå ÍùÊý¾Ý¿âÀï²åÈëÊý¾Ý
SqlConnection cn = new SqlConnection("Data Source=20090713-1752\\SQLEXPRESS;Initial Catalog=goods;Integrated Security=True");
......
´ó¼ÒºÃ£º
ÎÒÏëʵÏÖ¼ì²âµ½²åÈëSD¿¨ºó×Ô¶¯½«SD¿¨¸ñʽ»¯µÄ¹¦ÄÜ£¬²»ÖªC/C++ÖÐÓÐûÓиñʽ»¯UÅ̵ĺ¯Êý£¿
ÁíÍ⣬ÎÒ²»ÏëʹÓÃSHFormatDrive£¬ÒòΪÕâ¸öº¯Êý»áµ¯³öÊÇ·ñÒª¸ñʽ»¯µÄÌáʾ¿ò£¬ÎÒÐèÒªµÄÊÇϵͳ×Ô¶¯¸ñʽ»¯£¬¶ø²Ù×÷Õß² ......