记录自学学习C#中写过的代码

1._5第一个控制台程序



using
System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace _1._5第一个控制台程序 { class Program { static void Main(string[] args) { Console.WriteLine("Hello world!!!");//这句话用来输出文字到屏幕上方 Console.WriteLine("欢迎来到自学网学习由雪上行者讲解的C#入门编程"); Console.WriteLine(""); Console.WriteLine(""); Console.ReadKey();//等待用户输入,常用来对程序界面进行停留 //ksadjf kjklasj dfkj;lkj;lock /*545646 456446 45646*/ ///kdjk ljsdaljf kjsad ;fl /// dk k //这是我写的第一个程序,我很开心 // 我要自学网给了我很大的信心 } } }

 1.6我要自学网的第一个桌面应用程序

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace 我要自学网的第一个桌面应用程序
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void button_Click(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("这是我要自学网学习的第一个桌面应用程序!!!","消息框标题");
        }
    }
}

1._7本章总结及任务实施

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _1._7本章总结及任务实施
{
    class Program
    {
        static void Main(string[] args)
        {

            //Console.WriteLine("我要自学网学习C#真快乐!!");//用于输出屏幕
            //Console.ReadKey();
            //Console.WriteLine("");

            Console.WriteLine("*************************************************");
            Console.WriteLine("*       我要自学网学习的第一个程序              *");
            Console.WriteLine("*************************************************");
            Console.ReadKey();

        }
    }
}
原文地址:https://www.cnblogs.com/zqyo2000z/p/5338700.html