C# 的学习记录第一天

关于学习的资源,选的传智播客的视频,课程很多,但是并不准备学那么多,实际个人能力实在有限,能学多少是多少;

[传智播客.Net培训视频系列推荐学习顺序]:
第1季C#编程基础
第2季C#面向对象基础
第3季WinForm基础
第4季SQL从入门到提高
第5季ADO.Net
第6季HTML
第7季JavaScript
第8季Dom
第9季JQuery
第10季asp.net基础
第11季asp.net中级
第12季asp.net高级
第13季ajax

学习C#的好去处
http://msdn.microsoft.com
https://stackoverflow.com/
http://www.cnblogs.com (中文,强烈推荐)
http://www.codeplex.com (源码,强烈推荐)
http://www.codeproject.com (英文,强烈推荐)
http://code.msdn.microsoft.com/ (推荐)

以下是学习记录的笔记(Onenote复制过来的)

01面向过程基础知识

1 .net与C#

• .net:一般指.Net Framework框架,一种平台,一种技术 ;
• C#:一种编程语言,可以开发基于.net平台的应用;
• Java既是一种技术也是一种编程语言;

2 .net能做什么

• 开发桌面应用程序(WinForm)
• Internet应用程序(ASP.NET/WebService)
• UWP(手机应用)

• C/S:客户机/服务器模式
• B/S:浏览器/服务器模式

3 VS版本介绍及MSDN帮助文档介绍
4 创建第一个项目

02学习两句话

• 善用快捷键,提升效率 ;
• 解决方案中可以包含多个项目,项目可以包含多个文件,文件中是我们写的程序;

在文件中,命名空间namespace中可以包含类class,类中可以包含Main方法,方法中是我们写的程序;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _01我的第一个项目
{
    /// <summary>
    /// 这个类中有一个Main方法,是我们程序的入口方法;
    /// </summary>
    class Program
    {
        /// <summary>
        /// 程序运行时,从这里开始执行代码;
        /// </summary>
        /// <param name="args"></param>
        static void Main(string[] args)
        {
            //下面的这句话是向屏幕输出一句Hello,World!
            Console.WriteLine("Hello,World!");
            Console.WriteLine("这里显示你要表达的内容:这是我的第一个程序");
            Console.Write("aaaa");
            Console.Write("bbbb");


            Console.ReadKey();

        }
    }
}

• namespace :定义了一个命名空间:01我的第一个项目
Class:定义了一个名称为Program的类,类中包含Main方法
class.png

• 重置开发环境:可以使我们的开发工具恢复默认状态。例如:视图中的各种窗口;
• Main方法是我们程序(项目)的入口方法,当我们执行一个程序时,会首先找到Main方法,从Main方法的第一句程序开始执行,当Main方法执行完成后(即执行到Main方法的反大括号),程序就结束了;
所以,现在我们初学者写程序,就先卸载Main方法中;

static void Main(string[] args)
            {
                //下面的这句话是向屏幕输出一句Hello,World!
                Console.WriteLine("Hello,World!");
                Console.WriteLine("这里显示你要表达的内容:这是我的第一个程序");
                Console.Write("aaaa");
                Console.Write("bbbb");
    
    
                Console.ReadKey();
    
            }

vs2.png

.sln是解决方案的文件;
.csproj是项目文件;

先学习两句话,今天学习的第一句话:
Console.WriteLine("Hello,World!");
Console.Write.Line("显示你想表达的内容,这是我的第一个程序");
第二句话:
Console.ReadKey();
当程序执行到Console.ReadKey();时,程序会停在这里,等待用户从键盘上键入一个键,用户键入这个键之后,程序才继续执行;

在C#中,每一句话都必须以分号结束;

Console.WriteLine(“”);与Console.Write(“”);的区别

Frist.png

已有 6 条评论
  1. Stevehaush

    Call back or email me, I'm interested in your offer
    720-791-3210
    usa.bts@gmail.com

    Stevehaush 回复
  2. DavidMot

    We specialize in legal degrees from USA universities. Apostle/Notarization/Embassy legalization.

    Now we have partnered up with schools, from kindergarten up to college level, in whole China !

    From 1400 USD - 4000 USD a month, 4 hours per day on relaxed schedule.
    We will assist you with *all* that's needed. You will have the working Z-visa before you leave your home country.

    1. Arrival assistance, SIM card and bank account arranged
    2. Accommodation or housing stipend given
    3. Free meals at school
    4. Flight to China from anywhere in the world!
    5. Z-type work visa assistance
    6. Free TEFL course sponsorship
    7. Continual support and assistance from UK and South African office
    8. Mandarin classes provided :cn:
    9. Local foreign management team
    10. Bachelor degree for life, when needed !

    Check out details about our diplomas at https://www.degreeforlife.co.uk

    * Do you know somebody with interest ? Up to 300 USD through our affiliate program!

    DavidMot 回复
  3. hp2.com.cn

    Here is nice premium pay for win. hp2.com.cn
    http://bit.ly/2KzEYY7

    hp2.com.cn 回复
  4. RichardLeS

    Hi! hp2.com.cn

    We present oneself

    Sending your message through the Contact us form which can be found on the sites in the Communication section. Feedback forms are filled in by our application and the captcha is solved. The profit of this method is that messages sent through feedback forms are whitelisted. This method raise the odds that your message will be open.

    Our database contains more than 25 million sites around the world to which we can send your message.

    The cost of one million messages 99 USD

    FREE TEST mailing of 50,000 messages to any country of your choice.

    This message is automatically generated to use our contacts for communication.

    Contact us.
    Skype live:contactform_18
    Email - ContactForm@make-success.com
    WhatsApp - +353899461815

    RichardLeS 回复
  5. AnthonyTap

    Hi! We are working with businesses like yours to support them in the creation of excellent websites and mobile apps of any complexity and specification.
    If your CEO / CTO / CIO has plans to launch new digital resources or update existing ones (to iOS 13 for example), Aplana can be a valuable partner and assist in achieving those goals.
    Aplana was featured on the Clutch Rating List of the Top-200 Best Custom Software Developers 2018 in the world (you may google this information).
    Since 1999 we have launched over 1500 small and large IT projects worldwide. We deliver digital projects to US customers through our highly skilled software teams in Eastern Europe.
    This structure allows us to keep the cost for our services reasonable and justified while maintaining a quality of work that is exceptionally high.
    Please contact us if you have any technical RFP ( request@aplana.us ) or visit us at http://aplana.us
    to get more info.
    Please, accept our apology if it currently doesn't apply to you.

    AnthonyTap 回复
  6. AmparoGex

    Take a look at our Logo & Website design packages designed according to your budget as low as 39 USD (Logo) & 399 USD (website)!
    We’re a Digital Design Company and can help you with the all your design and development needs. If you want a Logo design, Stationery design, Printing, Website design and development, iPhone and Android App, Animated promotional Videos, Social Media Marketing, Search Engine Optimization or Google PPC, we can do it all.
    Sign Up Today To Increase Your Business Revenue
    https://halfpricelogo.com/

    AmparoGex 回复
发表新评论取消回复