利用System.Reflection实现php下的可变变量(Variable variables)
2008-07-07  作者:amao  同分类文章
description:
<?php
$a 
'hello';
$$a 'world';
echo "$a ${$a}";
echo "$a $hello";
?>
    public static string mystr = "this is mystr";

    public static void Main()
    {

        string readstr = Console.ReadLine();
        Type type = typeof(SamplesEncoding);
        FieldInfo fi = type.GetField(readstr);
        if (fi != null)
            Console.WriteLine(fi.GetValue(null));
        else
            Console.WriteLine("donnot had this property: " + readstr);
        Console.Read();


相关
常见连接数据库字符串
chm文档的右边内容是空白
.NET web service(soap)如何身份验证?
"Orcas" Mar07CTP体验DLINQ
asp.net session 跨子域(subdomain)
ado.net 连接 mysql mysql.data.dll下载
XBAP成功调用WebService
Visual Studio 2005 Express Edition 正式版下载地址
用于捕获摄像头的.net类库:DirectX.Capture, C# 捕
sql server 转 access 语法区别