C#ÖÐref²ÎÊýÓëout²ÎÊýµÄÇø±ð
ÏÈÌù´úÂë
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Ref_and_Out_test
{
class Program
{
static void Main(string[] args)
{
int a =0; //Èô²»³õʼ»¯b»á²úÉú±àÒëʱ´íÎó¡£Ê¹ÓÃδ³õʼ»¯±äÁ¿
int b = 1; //¼´Ê¹²»³õʼ»¯bҲûÓÐÎÊÌ⣻
RefAndOut(ref a,out b);
Console.WriteLine("after RefAndOut method process");
Console.WriteLine("a={0},b={1}", a, b);
}
static void RefAndOut(ref int a,out int b)
{
//b = 1; //Èô´Ë´¦²»½øÐгõʼ»¯£¬Ôòtry to print bÕâ¸öÓï¾äÎÞ·¨Ö´ÐÐ
Console.WriteLine("before change ref a=0 and out b =1 value");
//try to print b:Console.WriteLine("a={0},b={1}", a, b);
Console.WriteLine("Now change the value,a to 123 ,b to 999");
a = 123;
b = 999; //ÈôÔÚ·½·¨ÄÚ²»¶Ôb¸³Öµ£¬Ôò»á³öÏÖ±àÒëʱ´íÎóÌáÐѱØÐë¶Ôb¸³Öµ
&
Ïà¹ØÎĵµ£º
C#¶ÁÈ¡XML×ÊÁÏ
Ò» C#¶ÁÈ¡XML×ÊÁÏ
À©³ä±ê¼ÇÓïÑÔXML£¨eXtensible Markup Language£©£¬ÊÇÓÉWÈýC»ú¹ØÖƶ©µÄ¡£×öΪÓÃÒÔ´úÌæHTMLÓïÑÔµÄÒ»ÖÖÐÂʽµÄ±ê¼ÇÓïÑÔ£¬XMLÄÚ²¿ÓÐןܶà¸ù±¾»ù×¼£¬XMLÄËÊǾ¹ýÓëÕâЩÏà¸É»ù×¼µØ×éºÏ£¬Ó¦ÓÃÓÚ¿ÆÑ§¼ÆËã¡¢µç×Ó³ö°æ¡¢¶àýÌåϵÌåÀý×÷ºÍµç×ÓÉÌÎñµÄ¡£C££×÷ΪһÖÖÐÂʽµÄ³ÌÐòÓïÑÔ£¬ÊÇ.Net¹¹¼ÜµÄÒ»¸öÖ ......
1
<asp:UpdatePanelID="UpdatePanel1"
UpdateMode="Conditional"
runat="server">
<ContentTemplate>
<asp:Button ID="Button1"
......
ʾÀýÑÝʾÁËÓÃC#²Ù×÷MySQLµÄ·½·¨£¬ÌṩÁËÈý¸ö¿ÉÖØÓõÄÀàMySqlDBUtil,MySqlPageUtil,Page¡£
±¾Ê¾ÀýÓÉ C#²Ù×÷AccessÊý¾Ý¿âµÄ¼òµ¥Àý×Ó£¨http://www.albertsong.com/read-56.html£©Ð޸ĶøÀ´¡£
1.Ê×ÏÈÏÂÔØMySQLÊý¾Ý¿âµÄ.NETÇý¶¯
http://dev.mysql.com/get/Downloads/Connector-Net/mysql-connector-net-5.0.8.1-noinstall.zip/ ......
C#
DataSet ds = new DataSet();
ds.ReadXml(Server.MapPath("~/Config/User_yhlx_Jb.xml"));
DataView dv = ds.Tables[0].DefaultView;
//dv.RowFilter = "State=0";
this.DropDownList1.DataSource = dv;
this.DropDownList1.DataTextField = "text";
this ......
1£©XmlÎĵµÊ¾Àý£¨xmlsample.xml£©£º
Code
<?xml version="1.0" encoding="iso-8859-1" ?>
<music>
<song title="Oh,girl">
<artist>The Chi-lites</artist>
<genre>Soul</genre>
&nb ......