易截截图软件、单文件、免安装、纯绿色、仅160KB

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赋值
        &


相关文档:

oracle 时间类型 C#

在sql语句中涉及到时间类型时 若只想要日期  to_date('2007-7-8','yyyy-mm-dd')
  在C#中有datetime类型,代码说明一切
  DateTime dt = System.DateTime.Now;
string lsh;
lsh=string.Format("{0:yyyyMMddHHmmss}", dt);
DateTime dt = DateTime.Now;
Label1.Text = dt.To ......

c#(asp.net) updatepanel 局部刷新实例收藏

1
<asp:UpdatePanelID="UpdatePanel1"
        UpdateMode="Conditional"
        runat="server">
    <ContentTemplate>
        <asp:Button ID="Button1"
      ......

.net(c#)读取flash(swf)文件的尺寸

用了别人的代码,推荐+备忘。
原帖地址:
.net(c#)读取flash(swf)文件的尺寸
http://www.cnblogs.com/nasdaqhe/archive/2008/07/02/1234357.html
用.NET读取Flash格式文件信息
http://www.cnblogs.com/gmm/archive/2007/07/17/310675.html
我使用了第一个帖子中的代码,第一个帖子的代码参考的是第二个帖子:)
The ......

c# 支持XML序列化的泛型 Dictionary

/// <summary>
/// 支持XML序列化的泛型 Dictionary
/// </summary>
/// <typeparam name="TKey"></typeparam>
/// <typeparam name="TValue"></typeparam>
[XmlRoot("SerializableDictionary")]
public class SerializableDictionary<TKey, TValue& ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号