1 장 비주얼 C# 과 만남

Click here to load reader

download 1 장 비주얼  C# 과 만남

of 26

description

1 장 비주얼 C# 과 만남. 설치하기 전에. 비주얼 스튜디오 닷넷 닷넷 응용 프로그램을 개발할 수 있는 통합 환경 간단히 줄여서 VS.NET 이라고 부른다 VS.NET 은 윈도우 2000 계열 , XP 서버 버전에서 실행 윈도우 2000 계열 윈도우즈 XP 프로그램 설치 순서 윈도우 2000 / XP IIS 설치 SQL 서버 2000 ( 선택 사항 ) 윈도우 구성 요소 설치 ( 제공된 CD) VS.NET 설치 ( 제공된 CD). 설치하기 전에. - PowerPoint PPT Presentation

Transcript of 1 장 비주얼 C# 과 만남

  • 1 C#

  • ... VS.NET VS.NET 2000 , XP 2000 XP

    2000 / XPIIS SQL 2000 ( ) ( CD) VS.NET ( CD)

  • ... IIS IIS 2000 IIS [FrontPage Server Extension] 2000 , IIS FAT32 , [Server Extension] .

    2000 2.0 2.0 gkau, IIS OS

  • C# C# C# Main System.Console WriteLine

    , C# []-[ ]-[]

  • C#

  • C#

  • C#

    Class1 Hello , TODO

  • C#

    Console . .

  • C#

    []-[]

    Ctrl+F5 .

  • C#

    C# Main , Main . Console , System Console.WriteLine( "Hello C#" );

  • (class) , C# Main

    C# (method) C/C++ . , class Hello { }

  • (Member) (field), (method), (property), (event) . (instance) (static) (static) public int Method1( int n ) { return 0; } public static void Main() {}

  • FirstApp Hello

  • C# namespace TestProgram { namespace FirstApp { } } namespace TestProgram.FirstApp { }

  • using using

    using .

    Console System using TestProgram.FirstApp.Hello using TestProgram.FirstApp; // System System.Console.WriteLine( "Hello C#" );

  • WriteLine , WriteLine WriteLine "Hello" , ,

  • WriteLine "Hello" {0},{1} {0} {1}

    C# , {0},{1}.{2},.. .Console.WriteLine( "string : {0}", "C#" ); Console.WriteLine( "int : {0}", 123 ); Console.WriteLine( "double : {0}", 123.456 );

  • Write Write Write

    C# C/C++ \n' Console.Write( Hello ); Console.Write( C# Program ); Console.Write( Hello \n \n );

    \' \n NewLine \" \r carriage Return \\\ Back Slash \t Tab \b Backspace \v Vertical Tab

  • double f = 1234.5678; Console.WriteLine( "{0:F}", f ); // "1234.56" Console.WriteLine( "{0:F4}", f ); // "1234.5678" Console.WriteLine( "{0,20:F4}", f ); // " 1234.5678" Console.WriteLine( "{0,-20:F4}", f ); // "1234.5678 "

  • Main

    Main , void

    void public static int Main() { return 0; } public static void Main() { }

  • Main

    void return

    Main string

    Main arg1, arg2, arg3 string Main

    public static void Main() { .... return; } app.exe arg1 arg2 arg3

  • Main

    Length

    using System; class Class1 { public static void Main( string[] args ) { // 1 if ( args.Length > 1 ) { Console.WriteLine( "[0] : {0}", args[0] ); Console.WriteLine( "[1] : {0}", args[1] ); } else Console.WriteLine( "[usage]: arglist /option1 /option2" ); } }

  • Main

  • Main

    VS.NET VS.NET , . []

  • C# C# (class) - C# (method) - C# (method) .

    System.Console - Console WriteLine {0}, {1}

    Hello.Method(); Console.WriteLine( "{0} {1} {2}", "Hello", "C#", Programming );