private void OnButton1Click(object sender, RoutedEventArgs e)
        {
            MySampleLib.Demo d1 = new MySampleLib.Demo();
            string           s  = d1.Hello();

            MessageBox.Show(s);
        }
示例#2
0
        static void Main(string[] args)
        {
            MySampleLib.Demo d1 = new MySampleLib.Demo();
            string           s  = d1.Hello();

            Console.WriteLine(s);

            // d1.Message();  // cannot use Windows Forms

            int a = d1.StdAdd(38, 4);

            Console.WriteLine(a);
        }
 private void OnButton2Click(object sender, RoutedEventArgs e)
 {
     MySampleLib.Demo d1 = new MySampleLib.Demo();
     d1.Message();
 }