Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C# ¸ñʽ»¯Êä³öXML

ºÜ¶àʱºòÓÐÒ»¸öxml×Ö·û´®£¬Ã»Óл»ÐУ¬Ã»ÓÐËõ½ø£¬ÒªÉú³ÉxmlÎļþ²»Ò×ÔĶÁ¡£ÏÂÃæµÄ´úÂë¾ÍÊÇÔõô½«Ò»¸öÁ¬ÐøµÄxml×Ö·û´®¸ñʽ»¯Êä³ö
// a demo string
string xml = "<Root><Eles><Ele>abc</Ele><Ele>123</Ele></Eles></Root>";
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
doc.LoadXml(xml);
System.IO.StringWriter sw = new System.IO.StringWriter();
using (System.Xml.XmlTextWriter writer = new System.Xml.XmlTextWriter(sw))
{
    writer.Indentation = 2;  // the Indentation
    writer.Formatting = System.Xml.Formatting.Indented;
    doc.WriteContentTo(writer);
    writer.Close();
}
// out put the formated xml
Console.WriteLine(sw.ToString());


Ïà¹ØÎĵµ£º

C#Á¬½ÓmysqlÊý¾Ý¿â

using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using MySql ......

½«Í¼Æ¬µÈÎļþ±£´æµ½sqliteÖУ¨c#£©

 SqLite.netµÄdllΪSystem.Data.SQLite.dll£¬ÕâÖÖdll·ÖΪ32λ¡¢64λºÍÊÊÓÃÓÚcompactframeworkÈýÖÖ£¬ÔÚÒýÓÃʱҪעÒ⣬ѡÔñÕýÈ·µÄdll¡£
½«Òª±£´æÍ¼Æ¬µÄ×Ö¶ÎÀàÐÍÉèΪblob¡£´úÂëÈçÏ£º
private void savePicture£¨£©
{
using (SQLiteConnection cnn = new SQLiteConnection(dbPath))
......

C#ÐòÁл¯xmlµÄÍêÕûÀý×Ó

C#ÐòÁл¯xml
¹Ø¼ü²½Ö裺
XmlSerializer xSerializer = new XmlSerializer(typeof(MyObj));
StringWriter sWriter = new StringWriter(CultureInfo.InvariantCulture);
XmlTextWriter xTextWriter = new XmlTextWriter(sWriter);
......

ÈçºÎ¼ÆËãMS SQLÓï¾äÖ´ÐеÄʱ¼ä»¹ÓÐc#


MSSQL:
declare @begin datetime
declare @End datetime
set @begin=getdate()
   --Ö´ÐеÄÓï¾äдÔÚÕâÀï
set @End=getdate()
select datediff(millisecond,@begin,@End) as Ö´ÐеÄʱ¼ä
--millisecond±íʾºÁÃë Èç¹û¿´Ãë¿ÉÒÔʹÓÃss
C#:
ºÜ¶àʱº ......

C# Active¿Ø¼þ£¬²¢´¥·¢javascriptʼþ

´´½¨Ò»¸öWinformÓû§¿Ø¼þ UserControl1
 using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Reflection;
namespace MyActiveT ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ