Visual C 2005 Express IDE http www microsoft

  • Slides: 18
Download presentation

Visual C# 2005 Express IDE • 官方網站 http: //www. microsoft. com/taiwan/vstudio/expres s/visualcsharp/ 2

Visual C# 2005 Express IDE • 官方網站 http: //www. microsoft. com/taiwan/vstudio/expres s/visualcsharp/ 2

第 1支程式( VC#2005 Exp. ) using System; System. Collections. Generic; System. Text; namespace Hello

第 1支程式( VC#2005 Exp. ) using System; System. Collections. Generic; System. Text; namespace Hello { class Program{ static void Main(string[] args) { Console. Write. Line("Hello!"); Console. Write. Line( "This is my first C# program!"); } } } 5

第 1支程式( VC# 2005) using System; namespace Hello { /// <summary> /// Class 1

第 1支程式( VC# 2005) using System; namespace Hello { /// <summary> /// Class 1 的摘要描述。 /// </summary> class Program { static void Main(string[] args) { Console. Write. Line("Hello!"); Console. Write. Line( "This is my first C# program!"); } } } 6

第 2支C#應用程式 /* * 第 2支C#程式 * / using System; namespace Say. Hello {

第 2支C#應用程式 /* * 第 2支C#程式 * / using System; namespace Say. Hello { class Program { static void Main(string[] args) { string message = "Hello C#"; // 宣告變數 System. Console. Write. Line( message ); System. Console. Read(); } } } 7

計算機架構 CPU Memory Peripheral Devices 11

計算機架構 CPU Memory Peripheral Devices 11

Main Memory *J. G. Brookshear, Computer Science – An Overview, 8 th edition, Addison-Wesley,

Main Memory *J. G. Brookshear, Computer Science – An Overview, 8 th edition, Addison-Wesley, 2005 12

命名空間觀念 namespace Texts. IO { class File. IORW{ } }. . namespace Windows. IO

命名空間觀念 namespace Texts. IO { class File. IORW{ } }. . namespace Windows. IO { class File. IORW { } }. . Texts. IO. File. RW. . . Using Texts. IO; File. RW. . . 15

類別System. Console • 命名空間System • 類別Console – 鍵盤(Keyboard) – 螢幕(Screen) 16

類別System. Console • 命名空間System • 類別Console – 鍵盤(Keyboard) – 螢幕(Screen) 16

基本輸出與輸入 using class { System; Say. Hello. IO static void Main(string[] args) { string

基本輸出與輸入 using class { System; Say. Hello. IO static void Main(string[] args) { string read. String = Console. Read. Line(); Console. Write. Line("Hello, " + read. String); Console. Read. Line(); } } 17