以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 DTD/XML Schema 』  (http://bbs.xml.org.cn/list.asp?boardid=23)
----  Invoke function  (http://bbs.xml.org.cn/dispbbs.asp?boardid=23&rootid=&id=56906)


--  作者:f1029303
--  发布时间:12/18/2007 4:39:00 PM

--  Invoke function
Assembly ac = Assembly.LoadFile(@"D:\study\ClassLibrary1\bin\Debug\ClassLibrary1.dll");

        Type[] type = ac.GetTypes();

        for (int i = 0; i < type.Length; i++)
        {
            Response.Write("
" + type[i].ToString());
        }

        Response.Write("
" + "---------------------");

        Type ty = ac.GetType(type[0].ToString());
        MethodInfo[] methods = ty.GetMethods();

        foreach (MethodInfo method in methods)
        {
            Response.Write("
" + method.ToString());
        }

        Response.Write("
" + "---------------------");
        MethodInfo mi = ty.GetMethod("d");
        object obj = ac.CreateInstance(type[0].ToString());
        //string result = mi.Invoke(obj, new object[] { 200, 43}).ToString();

        object[] o = new object[3];
        o[0] = "200";
        o[1] = "43";
        mi.Invoke(obj,o);

        Response.Write("
" + "Invoke result is '" + o[2] + "'");


ClassLibrary1.Class1_test1
ClassLibrary1.Class2_test1
---------------------
System.String a(System.String, System.String)
Int32 b(Int32, Int32)
Void c(Int32, Int32, Int32 ByRef)
Void d(System.String, System.String, System.String ByRef)
System.Type GetType()
System.String ToString()
Boolean Equals(System.Object)
Int32 GetHashCode()
---------------------
Invoke result is '20043'



此主题相关图片如下:
按此在新窗口浏览图片



infor


New


Logout



此主题相关图片如下:
按此在新窗口浏览图片

[此贴子已经被作者于2007-12-24 9:38:23编辑过]

--  作者:f1029303
--  发布时间:12/18/2007 4:58:00 PM

--  
http://blog.sina.com.cn/u/3f87925101000cwi
--  作者:f1029303
--  发布时间:12/19/2007 6:23:00 PM

--  
Process p = new Process();
p.StartInfo.FileName ="E:\\gwb";            
p.Start();
我是在ASP.NET 2.0 C# 做的,能打开某个文件夹,但是它不能显示在最前方,在任务栏下。怎能解决这个问题啊!

--------------------------------------------------------------------------------
回复:关于在asp.net 打开文件夹问题。

Process.Start("explorer.exe", "e:\\");


--  作者:f1029303
--  发布时间:12/19/2007 6:36:00 PM

--  
<input type=button value=保存 onclick=document.execCommand('SaveAs')>

--  作者:f1029303
--  发布时间:12/19/2007 10:43:00 PM

--  
如何获取客户端用户登录Windows的用户名 _NET技术 - ASP_NET - CSDN社区 community_csdn_net.htm
http://topic.csdn.net/t/20060623/12/4838968.html

--  作者:f1029303
--  发布时间:12/21/2007 10:45:00 PM

--  
<html>
<head>
<script language="javascript">
function dic(){
var localpath = new ActiveXObject("Shell.Application").BrowseForFolder(0, "please select path", 0, "").Items().Item().Path
return localpath;
}

alert(dic());
var txt=document.getElementById("txtname");
txt.value=dic()

</script>
</head>
<body>
<input type="text" id="txtname"/>
only test

</body>
</html>


--  作者:f1029303
--  发布时间:12/23/2007 9:55:00 PM

--  
<html>
<head>
<script language="javascript">
function dic(){
document.getElementById('txtname').value='asdfasdfasdf';//path;

var localpath = new ActiveXObject("Shell.Application").BrowseForFolder(0, "please select path", 0, "").Items().Item().Path;
return localpath;
}

alert(dic());
//var path =dic();


</script>
</head>
<body>
<input type="text" id="txtname"/>
only test

</body>
</html>


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
54.688ms