Example #1
0
 private void btntest4_Click(object sender, EventArgs e)
 {
     try
     {
         DynamicCallLib callLib = new DynamicCallLib("LibDotNet45", "Test", "resstring");
         string         res     = callLib.CallResMethod <string>(new object[] { "今天赚了多少钱?", 25.43f });
         tbMsg.AppendText("返回消息:" + res + "\r\n");
     }
     catch (Exception ex)
     {
         tbMsg.AppendText(ex.Message + "\r\n");
     }
 }
Example #2
0
 private void btntest3_Click(object sender, EventArgs e)
 {
     try
     {
         DynamicCallLib callLib = new DynamicCallLib("LibDotNet45", "Test", "getint");
         int            qty     = callLib.CallResMethod <int>();
         tbMsg.AppendText("得到的返回数为" + qty + "\r\n");
     }
     catch (Exception ex)
     {
         tbMsg.AppendText(ex.Message + "\r\n");
     }
 }