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¸³Öµ
&
Ïà¹ØÎĵµ£º
Á¬½ÓAccess
Ê×ÏÈ¿´Ò»¸öÀý×Ó´úÂëƬ¶Ï:
³ÌÐò´úÂë:
--------------------------------------------------------------------------------
using System.Data;
using System.Data.OleDb;
......
string strConnection="Provider=Microsoft.Jet.OleDb.4.0;";
strConnection+=@"Data Source=C:\BegASPNET\Northwind.mdb" ......
¡¡SQLÖÐÓÐËÄÖÖ»ù±¾µÄDML²Ù×÷£ºINSERT£¬SELECT£¬UPDATEºÍDELETE¡£
INSERTÓï¾ä
¡¡¡¡Óû§¿ÉÒÔÓÃINSERTÓï¾ä½«Ò»ÐмǼ²åÈëµ½Ö¸¶¨µÄÒ»¸ö±íÖС£ÀýÈ磬Ҫ½«¹ÍÔ±John SmithµÄ¼Ç¼²åÈëµ½±¾ÀýµÄ±íÖУ¬¿ÉÒÔʹÓÃÈçÏÂÓï¾ä£º
¡¡¡¡INSERT INTO EMPLOYEES VALUES
¡¡¡¡ ('Smith','John','1980-06-10',
¡¡¡¡ 'Los Angles',16,45000);
¡¡ ......
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 ......
Ò»¡¢SQL SERVER ºÍACCESSµÄÊý¾Ýµ¼Èëµ¼³ö
³£¹æµÄÊý¾Ýµ¼Èëµ¼³ö£º
ʹÓÃDTSÏòµ¼Ç¨ÒÆÄãµÄAccessÊý¾Ýµ½SQL Server£¬Äã¿ÉÒÔʹÓÃÕâЩ²½Öè:
¡¡¡¡¡ð1ÔÚSQL SERVERÆóÒµ¹ÜÀíÆ÷ÖеÄTools£¨¹¤¾ß£©²Ëµ¥ÉÏ£¬Ñ¡ÔñData Transformation
¡¡¡¡¡ð2Services£¨Êý¾Ýת»»·þÎñ£©£¬È»ºóÑ¡Ôñ czdImport Data£¨µ¼ÈëÊý¾Ý£©¡£
¡¡¡¡¡ ......
public class yzzSerialize
{
private yzzSerialize()
{ }
private static yzzCache cache = new yzzCache();
public static T GetfromXml<T>(string xmlpath, T t)
{
using (FileStream fs = new FileStream(xmlpath, FileMode.Open, FileAcces ......