C#核心技术知识讲解.pptxVIP

  • 37
  • 0
  • 约2.47万字
  • 约 119页
  • 2020-04-19 发布于浙江
  • 举报
C#核心技术Hello World// A Hello World! program in C#.using System;namespace HelloWorld{ class Hello { static void Main() { Console.WriteLine(Hello World!); // Keep the console window open in debug mode. Console.WriteLine(Press any key to exit.); Console.ReadKey(); } }}Main方法Main 方法是 C# 控制台应用程序或窗口应用程序的入口点。 (库和服务不要求将 Main 方法作为入口点)应用程序启动时,Main 方法是第一个调用的方法Main 方法是驻留在类或结构内的static方法Main 的返回类型有两种:void 或 int可以具有包含命令行实参的 string[] 形参,也可以不具有这样的形参注释// A Hello World! program in C#./* A Hello World! program in C#.This program displays the string Hello World! on the screen. */C# 程序的通用结构// A skeleton of a C# pr

文档评论(0)

1亿VIP精品文档

相关文档